Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -322,5 +322,26 @@ APA Citations:
|
|
| 322 |
|
| 323 |
st.session_state.followup_question = ""
|
| 324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
except Exception as e:
|
| 326 |
st.error(f"β Error occurred: {e}")
|
|
|
|
| 322 |
|
| 323 |
st.session_state.followup_question = ""
|
| 324 |
|
| 325 |
+
# π Methodology Recommender
|
| 326 |
+
st.subheader("π§ͺ Methodology Recommender")
|
| 327 |
+
|
| 328 |
+
if st.button("π§ Suggest Research Methodologies"):
|
| 329 |
+
if st.session_state.last_report:
|
| 330 |
+
try:
|
| 331 |
+
method_prompt = [
|
| 332 |
+
{"role": "system", "content": "You are a research advisor. Based on the report, suggest appropriate research methodologies or experimental frameworks (qualitative, quantitative, statistical models, AI/ML techniques, etc.). Provide concise and specific recommendations in bullet points."},
|
| 333 |
+
{"role": "user", "content": st.session_state.last_report}
|
| 334 |
+
]
|
| 335 |
+
method_output = ""
|
| 336 |
+
method_box = st.empty()
|
| 337 |
+
for chunk in call_llm(method_prompt):
|
| 338 |
+
method_output += chunk
|
| 339 |
+
method_box.markdown(method_output, unsafe_allow_html=True)
|
| 340 |
+
except Exception as e:
|
| 341 |
+
st.error(f"β Methodology suggestion failed: {e}")
|
| 342 |
+
else:
|
| 343 |
+
st.warning("β οΈ Generate the research report first to get methodology suggestions.")
|
| 344 |
+
|
| 345 |
+
|
| 346 |
except Exception as e:
|
| 347 |
st.error(f"β Error occurred: {e}")
|