Spaces:
Running
Running
adrianpierce
commited on
Commit
•
4b73319
1
Parent(s):
d1a27f3
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def generate_recipe(user_inputs):
|
|
65 |
"properties": {
|
66 |
"name": {
|
67 |
"type": "string",
|
68 |
-
"description": "Name of the ingredient"
|
69 |
}
|
70 |
}
|
71 |
}
|
@@ -180,12 +180,12 @@ if st.session_state.gpt_response is not None:
|
|
180 |
st.divider()
|
181 |
recipe = json.loads(st.session_state.gpt_response.choices[0].message.function_call.arguments)
|
182 |
recipe_md = ''
|
183 |
-
recipe_md += f'#{recipe["name"]} \n\n'
|
184 |
recipe_md += f'{recipe["description"]} \n\n'
|
185 |
-
recipe_md += f'##Ingredients: \n'
|
186 |
for ingredient in recipe['ingredients']:
|
187 |
recipe_md += f"- {ingredient['name']} \n"
|
188 |
-
recipe_md += f'\n##Instructions:\n'
|
189 |
for instruction in recipe['instructions']:
|
190 |
recipe_md += f"{instruction['step_number']}. {instruction['instruction']} \n"
|
191 |
st.markdown(recipe_md)
|
|
|
65 |
"properties": {
|
66 |
"name": {
|
67 |
"type": "string",
|
68 |
+
"description": "Name of the ingredient and the quantity required"
|
69 |
}
|
70 |
}
|
71 |
}
|
|
|
180 |
st.divider()
|
181 |
recipe = json.loads(st.session_state.gpt_response.choices[0].message.function_call.arguments)
|
182 |
recipe_md = ''
|
183 |
+
recipe_md += f'# {recipe["name"]} \n\n'
|
184 |
recipe_md += f'{recipe["description"]} \n\n'
|
185 |
+
recipe_md += f'## Ingredients: \n'
|
186 |
for ingredient in recipe['ingredients']:
|
187 |
recipe_md += f"- {ingredient['name']} \n"
|
188 |
+
recipe_md += f'\n## Instructions:\n'
|
189 |
for instruction in recipe['instructions']:
|
190 |
recipe_md += f"{instruction['step_number']}. {instruction['instruction']} \n"
|
191 |
st.markdown(recipe_md)
|