rubenml commited on
Commit
a07469f
·
verified ·
1 Parent(s): 5e69db0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -20,14 +20,10 @@ class BasicAgent:
20
 
21
  def __call__(self, question: str) -> str:
22
  """
23
- Process the question using T5 with a detailed prompt and return an answer.
24
- """
25
- # Create a more structured and detailed prompt
26
- prompt = f"""
27
- You are an intelligent assistant. Please answer the following question as accurately as possible:
28
- Question: {question}
29
- Answer:
30
  """
 
 
31
 
32
  try:
33
  # Use the T5 pipeline to generate an answer
@@ -38,7 +34,6 @@ class BasicAgent:
38
  answer = "Error processing question."
39
 
40
  return answer
41
-
42
  def run_and_submit_all( profile: gr.OAuthProfile | None):
43
  """
44
  Fetches all questions, runs the BasicAgent on them, submits all answers,
 
20
 
21
  def __call__(self, question: str) -> str:
22
  """
23
+ Process the question using T5 with a clear and structured prompt, and return an answer.
 
 
 
 
 
 
24
  """
25
+ # Create a clearer and more direct prompt
26
+ prompt = f"Answer the following question: {question}"
27
 
28
  try:
29
  # Use the T5 pipeline to generate an answer
 
34
  answer = "Error processing question."
35
 
36
  return answer
 
37
  def run_and_submit_all( profile: gr.OAuthProfile | None):
38
  """
39
  Fetches all questions, runs the BasicAgent on them, submits all answers,