Workflow Updates
Browse files- src/streamlit_app.py +31 -1
src/streamlit_app.py
CHANGED
@@ -123,4 +123,34 @@ elaboration_agent = Agent(
|
|
123 |
4. Preserve the original structure while making it more comprehensive
|
124 |
5. Ensure all additions are relevant and valuable to the topic.
|
125 |
"""
|
126 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
4. Preserve the original structure while making it more comprehensive
|
124 |
5. Ensure all additions are relevant and valuable to the topic.
|
125 |
"""
|
126 |
+
)
|
127 |
+
|
128 |
+
async def run_research_process(topic : str):
|
129 |
+
"""Run the complete research process"""
|
130 |
+
# Step 1 - Intial Research
|
131 |
+
with st.spinner("Conducting initial research..."):
|
132 |
+
research_results = await Runner.run(research_agent, topic)
|
133 |
+
initial_report = research_results.final_output
|
134 |
+
# Display initial report
|
135 |
+
with st.expander("View Initial Research Report"):
|
136 |
+
st.markdown(initial_report)
|
137 |
+
|
138 |
+
|
139 |
+
# Step 2 - Enhance the report
|
140 |
+
with st.spinner("Enhancing the report with additional information..."):
|
141 |
+
elaboration_input = f"""
|
142 |
+
RESEARCH_TOPIC = {topic}
|
143 |
+
|
144 |
+
INITIAL RESEARCH REPORT:
|
145 |
+
{initial_report}
|
146 |
+
|
147 |
+
Please enhance this research report with additional information,
|
148 |
+
examples, case studies, and deeper insights while maintaining its
|
149 |
+
academic rigor and factual accuracy.
|
150 |
+
"""
|
151 |
+
|
152 |
+
elaboration_results = await Runner.run(elaboration_agent, elaboration_input)
|
153 |
+
enhanced_report = elaboration_results.final_output
|
154 |
+
|
155 |
+
return enhanced_report
|
156 |
+
|