Spaces:
Build error
Build error
Update app.py
Browse files
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
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
| 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
|