zineb-chgari commited on
Commit
f979dd3
·
verified ·
1 Parent(s): e285ea9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -75,9 +75,9 @@ class BasicAgent:
75
  raise e
76
 
77
 
78
- def __call__(self, question: str) -> str:
79
  """Run either local HF pipeline or remote API chat."""
80
- try:
81
  print(f"\n➡️ Agent received question: {question[:80]}")
82
 
83
  if getattr(self, "model_type", None) == "local":
@@ -99,7 +99,7 @@ class BasicAgent:
99
  print(f"✅ Agent returning answer: {answer[:100]}...")
100
  return answer
101
 
102
- except Exception as e:
103
  print(f"❌ Agent encountered an error: {e}")
104
  traceback.print_exc()
105
  return f"Error generating answer: {e}"
 
75
  raise e
76
 
77
 
78
+ def __call__(self, question: str) -> str:
79
  """Run either local HF pipeline or remote API chat."""
80
+ try:
81
  print(f"\n➡️ Agent received question: {question[:80]}")
82
 
83
  if getattr(self, "model_type", None) == "local":
 
99
  print(f"✅ Agent returning answer: {answer[:100]}...")
100
  return answer
101
 
102
+ except Exception as e:
103
  print(f"❌ Agent encountered an error: {e}")
104
  traceback.print_exc()
105
  return f"Error generating answer: {e}"