Найти тему

Создание рецептов с помощью искусственного интеллекта

Автор: Stable Diffusion, по описанию: Hyper-realistic photo of an robot chef cooking in the kitchen, white cap on his head, ultra detailed, cinematic
Автор: Stable Diffusion, по описанию: Hyper-realistic photo of an robot chef cooking in the kitchen, white cap on his head, ultra detailed, cinematic

Привет на связи AI Шеф-повар!

В этой статье расскажу как происходит генерация рецептов, и картинок к ним с помощью искусственного интеллекта.

Для генерации текста используется нейронная сеть Chat GPT 3.5 (Как получить к ней доступ, есть в интернет). Первый запрос к чату был следующим: You act as a chef. I will ask you to come up with a non-existent simple dinner dish and you will give it a name and a 500-character recipe. You will give all the units of measurement in the metric system.

Перевод:

Вы выступаете в роли шеф-повара. Я попрошу вас придумать несуществующее простое блюдо для ужина, а вы дадите ему название и рецепт из 500 символов. Вы укажете все единицы измерения в метрической системе.

Все запросы даются на английском языке и принимаются на английском языке. Для переводов используется нейронная сеть DeepL.

Далее подаются запросы по типу: Make up a dish for dinner.

Перевод:

Приготовьте блюдо на ужин.

В конце заменяются слова повода: завтрак, обед, ужин, выпечка и т.д. на английском. И сеть выдает готовый рецепт по типу:

Sure, here's a recipe for a delicious dinner dish:

Name: Garlic Shrimp Linguine

Ingredients:

1. 1 pound of linguine pasta (450g)

2. 1 pound of large shrimp, peeled and deveined (450g)

3. 4 cloves of garlic, minced

4. 1/4 cup of extra-virgin olive oil (60ml)

5. 1/2 teaspoon of red pepper flakes

6. Juice of 1 lemon

7. 1/4 cup of fresh parsley leaves, chopped (10g)

8. Salt and black pepper to taste

Instructions:

1. Cook the linguine pasta in a large pot of boiling salted water until al dente, according to package instructions.

2. While the pasta cooks, heat the olive oil in a large skillet over medium heat.

3. Add the minced garlic and red pepper flakes and sauté for 1-2 minutes, until fragrant.

4. Add the shrimp to the skillet and cook for 2-3 minutes on each side, until pink and cooked through.

5. Remove the skillet from heat and stir in the lemon juice and chopped parsley.

6. Drain the linguine pasta and add it to the skillet with the shrimp.

7. Toss the pasta and shrimp together until well combined.

8. Season with salt and black pepper to taste.

9. Serve immediately, garnished with additional chopped parsley if desired.

This garlic shrimp linguine is a simple yet flavorful dinner dish that's sure to impress. The shrimp are cooked in a garlic and red pepper-infused olive oil, then tossed with linguine pasta and fresh parsley. The lemon juice adds a bright acidity that balances out the richness of the dish. It's perfect for a quick and easy weeknight dinner, or for entertaining guests. Enjoy!

Этот рецепт вставляется в тот же переводчик.

Следующий этап генерация картинки.

На данный момент используется нейросеть Stable Diffusion. Она устанавливается в Google Colab(Как это делать, есть в интернет) Генерации другой нейросети Midjourney мне нравятся больше. Так как есть проблемы с оплатой, она для меня пока не доступна. Запрос к сети выглядит примерно так: Hyper realistic photo Garlic Shrimp Linguine, shot at an angle, 24 mm lens, ultra detailed, cinematic. Этот запрос называется promts(промты), о них можно почитать в сети.

Самое главное в работе с нейронными сетями научиться делать четкие и понятные запросы(prompt engineering). Области применения ИИ огромный список. Это бизнес, творчество, медицина, производство и многое другое

Лайк, если кто нибудь дочитал 👍

Ясного дня! Конец связи...