Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
|
|
2 |
from graph import EssayWriter, RouteQuery, GraphState
|
3 |
from crew import *
|
4 |
import os
|
|
|
5 |
import base64
|
6 |
|
7 |
st.set_page_config(page_title="Multi-Agent Essay Writing Assistant", page_icon="🤖🤖🤖✍️", layout = "centered")
|
@@ -157,15 +158,16 @@ with tab2:
|
|
157 |
st.subheader("📊 Multi-Agent Workflow Visualization")
|
158 |
|
159 |
try:
|
160 |
-
|
161 |
-
graph_path = "/tmp/graph.png" # Ensure graph.py generates this
|
162 |
if os.path.exists(graph_path):
|
163 |
st.image(graph_path, caption="Multi-Agent Workflow", use_column_width=True)
|
164 |
else:
|
165 |
-
st.warning("⚠️ Workflow graph not found.
|
166 |
|
167 |
except Exception as e:
|
168 |
-
st.error(
|
|
|
|
|
169 |
|
170 |
# Acknowledgment Section
|
171 |
st.markdown(
|
|
|
2 |
from graph import EssayWriter, RouteQuery, GraphState
|
3 |
from crew import *
|
4 |
import os
|
5 |
+
import traceback
|
6 |
import base64
|
7 |
|
8 |
st.set_page_config(page_title="Multi-Agent Essay Writing Assistant", page_icon="🤖🤖🤖✍️", layout = "centered")
|
|
|
158 |
st.subheader("📊 Multi-Agent Workflow Visualization")
|
159 |
|
160 |
try:
|
161 |
+
graph_path = "/tmp/graph.png"
|
|
|
162 |
if os.path.exists(graph_path):
|
163 |
st.image(graph_path, caption="Multi-Agent Workflow", use_column_width=True)
|
164 |
else:
|
165 |
+
st.warning("⚠️ Workflow graph not found. Please run `graph.py` to regenerate `graph.png`.")
|
166 |
|
167 |
except Exception as e:
|
168 |
+
st.error("❌ An error occurred while generating the workflow visualization.")
|
169 |
+
st.text_area("Error Details:", traceback.format_exc(), height=200)
|
170 |
+
|
171 |
|
172 |
# Acknowledgment Section
|
173 |
st.markdown(
|