wakeupmh commited on
Commit
f90b4a9
·
1 Parent(s): 67c9f69

fix: prompt

Browse files
Files changed (1) hide show
  1. app.py +8 -8
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 comprehensive answer about autism, using the 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. Provide a general explanation about the topic
220
- 2. Use the research papers as references, citing them in the format "According to [PAPER TITLE], ..."
221
- 3. Integrate research findings naturally into the explanation
222
- 4. Keep the focus on being informative and helpful
223
 
224
- Answer in a clear, informative way, using the papers as references."""
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