Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -418,11 +418,19 @@ if uploaded_file and st.button("🧠 Analyze and Suggest Improvements"):
|
|
| 418 |
if not paper_text or len(paper_text.strip()) < 100:
|
| 419 |
st.warning("⚠️ The uploaded paper seems empty or too short to analyze.")
|
| 420 |
else:
|
| 421 |
-
|
| 422 |
{"role": "system", "content": "You are an expert academic advisor."},
|
| 423 |
-
{"role": "user", "content": f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
]
|
| 425 |
|
|
|
|
| 426 |
with st.status("🔎 Analyzing your paper..."):
|
| 427 |
improvement_output = ""
|
| 428 |
feedback_box = st.empty()
|
|
|
|
| 418 |
if not paper_text or len(paper_text.strip()) < 100:
|
| 419 |
st.warning("⚠️ The uploaded paper seems empty or too short to analyze.")
|
| 420 |
else:
|
| 421 |
+
feedback_prompt = [
|
| 422 |
{"role": "system", "content": "You are an expert academic advisor."},
|
| 423 |
+
{"role": "user", "content": f"""I have written the following research paper. Please analyze it and provide detailed suggestions on:
|
| 424 |
+
- Areas where the paper is weak or unclear
|
| 425 |
+
- How to improve the novelty or originality
|
| 426 |
+
- Structural improvements or better ways to present arguments
|
| 427 |
+
|
| 428 |
+
Be honest and constructive. Here's the full text:
|
| 429 |
+
|
| 430 |
+
\"\"\"{paper_text}\"\"\""""}
|
| 431 |
]
|
| 432 |
|
| 433 |
+
|
| 434 |
with st.status("🔎 Analyzing your paper..."):
|
| 435 |
improvement_output = ""
|
| 436 |
feedback_box = st.empty()
|