tonyliu404 commited on
Commit
1d93d68
·
verified ·
1 Parent(s): 4d9e721

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -233,10 +233,11 @@ def display_response(response):
233
  """
234
  Function to format a JSON response into Streamlit's `st.write()` format.
235
  """
 
236
  if isinstance(response, str):
237
  # Convert JSON string to dictionary if necessary
238
  response = json.loads(response)
239
-
240
  st.write("### Recipe Details")
241
  st.write(f"**Name:** {response['name'].capitalize()}")
242
  st.write(f"**Preparation Time:** {response['minutes']} minutes")
 
233
  """
234
  Function to format a JSON response into Streamlit's `st.write()` format.
235
  """
236
+ print("ORIGINAL RESPONSE", response)
237
  if isinstance(response, str):
238
  # Convert JSON string to dictionary if necessary
239
  response = json.loads(response)
240
+ print("JSON CONVERTED RESPONSE: ", response)
241
  st.write("### Recipe Details")
242
  st.write(f"**Name:** {response['name'].capitalize()}")
243
  st.write(f"**Preparation Time:** {response['minutes']} minutes")