Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added missing closing brackets in Chp 6 README.md #634

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions 06-text-generation-apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ Now that we have played out a scenario, let's write code to match the demonstrat
1. Let's change the code in the following way:

```python
no_recipes = input("No of recipes (for example, 5: ")
no_recipes = input("No of recipes (for example, 5): ")

ingredients = input("List of ingredients (for example, chicken, potatoes, and carrots: ")
ingredients = input("List of ingredients (for example, chicken, potatoes, and carrots): ")

# interpolate the number of recipes into the prompt an ingredients
prompt = f"Show me {no_recipes} recipes for a dish with the following ingredients: {ingredients}. Per recipe, list all the ingredients used"
Expand All @@ -410,8 +410,8 @@ Now that we have played out a scenario, let's write code to match the demonstrat
Taking the code for a test run, could look like this:

```output
No of recipes (for example, 5: 3
List of ingredients (for example, chicken, potatoes, and carrots: milk,strawberries
No of recipes (for example, 5): 3
List of ingredients (for example, chicken, potatoes, and carrots): milk,strawberries

-Strawberry milk shake: milk, strawberries, sugar, vanilla extract, ice cubes
-Strawberry shortcake: milk, flour, baking powder, sugar, salt, unsalted butter, strawberries, whipped cream
Expand All @@ -427,7 +427,7 @@ To further improve it, we want to add the following:
- **Filter out ingredients**. We want to be able to filter out ingredients we don't like or are allergic to. To accomplish this change, we can edit our existing prompt and add a filter condition to the end of it like so:

```python
filter = input("Filter (for example, vegetarian, vegan, or gluten-free: ")
filter = input("Filter (for example, vegetarian, vegan, or gluten-free): ")

prompt = f"Show me {no_recipes} recipes for a dish with the following ingredients: {ingredients}. Per recipe, list all the ingredients used, no {filter}"
```
Expand All @@ -437,9 +437,9 @@ To further improve it, we want to add the following:
An example input of running the program can now look like so:

```output
No of recipes (for example, 5: 3
List of ingredients (for example, chicken, potatoes, and carrots: onion,milk
Filter (for example, vegetarian, vegan, or gluten-free: no milk
No of recipes (for example, 5): 3
List of ingredients (for example, chicken, potatoes, and carrots): onion,milk
Filter (for example, vegetarian, vegan, or gluten-free): no milk

1. French Onion Soup

Expand Down Expand Up @@ -539,9 +539,9 @@ To further improve it, we want to add the following:
Taking this code for a spin, we now arrive at the following output:

```output
No of recipes (for example, 5: 2
List of ingredients (for example, chicken, potatoes, and carrots: apple,flour
Filter (for example, vegetarian, vegan, or gluten-free: sugar
No of recipes (for example, 5): 2
List of ingredients (for example, chicken, potatoes, and carrots): apple,flour
Filter (for example, vegetarian, vegan, or gluten-free): sugar


-Apple and flour pancakes: 1 cup flour, 1/2 tsp baking powder, 1/2 tsp baking soda, 1/4 tsp salt, 1 tbsp sugar, 1 egg, 1 cup buttermilk or sour milk, 1/4 cup melted butter, 1 Granny Smith apple, peeled and grated
Expand Down
Loading