SwatGarg commited on
Commit
00db182
·
verified ·
1 Parent(s): 619b191

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -38,14 +38,11 @@ class ContentCrew:
38
 
39
  return result
40
 
 
41
  def display_result(result):
42
  st.write("## Research on Topic")
43
  st.write('-------------------------------')
44
 
45
- # Debugging: Print the result to ensure it has content
46
- st.write("DEBUG: Displaying result")
47
- st.json(result) # Streamlit's way to print JSON data
48
-
49
  if 'content_plan' in result:
50
  st.write("### Content Plan")
51
  st.write(result['content_plan'])
@@ -57,9 +54,11 @@ def display_result(result):
57
 
58
  if 'images' in result:
59
  st.write("### Images")
60
- for idx, image in enumerate(result['images']):
61
- image_path = f'image_{idx}.png'
62
- st.image(image_path, caption=f"Figure {idx+1}: {image['description']}")
 
 
63
 
64
 
65
  # Streamlit UI
 
38
 
39
  return result
40
 
41
+ # Function to display the result in Streamlit
42
  def display_result(result):
43
  st.write("## Research on Topic")
44
  st.write('-------------------------------')
45
 
 
 
 
 
46
  if 'content_plan' in result:
47
  st.write("### Content Plan")
48
  st.write(result['content_plan'])
 
54
 
55
  if 'images' in result:
56
  st.write("### Images")
57
+ for image in result['images']:
58
+ st.image(image['url'], caption=image['description'])
59
+
60
+ if 'content' in result:
61
+ st.markdown(result['content'])
62
 
63
 
64
  # Streamlit UI