Spaces:
Sleeping
Sleeping
OmPrakashSingh1704
commited on
Commit
•
761fc5b
1
Parent(s):
685486b
Update app.py
Browse files
app.py
CHANGED
@@ -148,17 +148,17 @@ with button_cols_submit[2]:
|
|
148 |
if st.session_state.recipe is not None:
|
149 |
st.divider()
|
150 |
print(st.session_state.recipe)
|
151 |
-
recipe = json.loads(st.session_state.recipe)
|
152 |
-
recipe_md = ''
|
153 |
-
recipe_md += f'# {recipe["name"]} \n\n'
|
154 |
-
recipe_md += f'{recipe["description"]} \n\n'
|
155 |
-
recipe_md += '## Ingredients: \n'
|
156 |
-
for ingredient in recipe['ingredients']:
|
157 |
-
|
158 |
-
recipe_md += '\n## Instructions:\n'
|
159 |
-
for instruction in recipe['instructions']:
|
160 |
-
|
161 |
-
recipe['md'] = recipe_md
|
162 |
-
recipe['timestamp'] = str(datetime.now())
|
163 |
-
st.markdown(
|
164 |
st.write("")
|
|
|
148 |
if st.session_state.recipe is not None:
|
149 |
st.divider()
|
150 |
print(st.session_state.recipe)
|
151 |
+
# recipe = json.loads(st.session_state.recipe)
|
152 |
+
# recipe_md = ''
|
153 |
+
# recipe_md += f'# {recipe["name"]} \n\n'
|
154 |
+
# recipe_md += f'{recipe["description"]} \n\n'
|
155 |
+
# recipe_md += '## Ingredients: \n'
|
156 |
+
# for ingredient in recipe['ingredients']:
|
157 |
+
# recipe_md += f"- {ingredient['name']} \n"
|
158 |
+
# recipe_md += '\n## Instructions:\n'
|
159 |
+
# for instruction in recipe['instructions']:
|
160 |
+
# recipe_md += f"{instruction['step_number']}. {instruction['instruction']} \n"
|
161 |
+
# recipe['md'] = recipe_md
|
162 |
+
# recipe['timestamp'] = str(datetime.now())
|
163 |
+
st.markdown(st.session_state.recipe)
|
164 |
st.write("")
|