Spaces:
Sleeping
Sleeping
fix: prompt
Browse files
app.py
CHANGED
@@ -208,20 +208,20 @@ def generate_answer(question, context, max_length=512):
|
|
208 |
clean_question = clean_text(question)
|
209 |
|
210 |
# Format the input for T5 (it expects a specific format)
|
211 |
-
input_text = f"""Generate a
|
212 |
|
213 |
Question: {clean_question}
|
214 |
|
215 |
-
Research Papers:
|
216 |
{clean_context}
|
217 |
|
218 |
-
Instructions:
|
219 |
-
1.
|
220 |
-
2. Use the research papers
|
221 |
-
3. Integrate
|
222 |
-
4.
|
223 |
|
224 |
-
|
225 |
|
226 |
try:
|
227 |
# T5 expects a specific format for the input
|
|
|
208 |
clean_question = clean_text(question)
|
209 |
|
210 |
# Format the input for T5 (it expects a specific format)
|
211 |
+
input_text = f"""Generate a detailed and well-structured answer about autism, using the provided research papers as references to support your explanations.
|
212 |
|
213 |
Question: {clean_question}
|
214 |
|
215 |
+
Research Papers:
|
216 |
{clean_context}
|
217 |
|
218 |
+
Instructions:
|
219 |
+
1. Begin with a clear and concise overview of autism, explaining its key characteristics and significance.
|
220 |
+
2. Use the research papers to support your explanation, citing them in the format: "According to [PAPER TITLE], ...".
|
221 |
+
3. Integrate findings from the papers naturally into your response, ensuring the information is accurate and relevant.
|
222 |
+
4. Focus on providing informative, helpful, and easy-to-understand insights.
|
223 |
|
224 |
+
Write your answer in a professional and accessible tone, ensuring it is well-organized and grounded in the provided research."""
|
225 |
|
226 |
try:
|
227 |
# T5 expects a specific format for the input
|