Lulube commited on
Commit
9aa44f8
·
verified ·
1 Parent(s): 3324ff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -35,6 +35,17 @@ class BasicAgent():
35
  )
36
 
37
  print("Alfred agent ready with search and webpage tools!")
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  def run_and_submit_all( profile: gr.OAuthProfile | None):
40
  """
 
35
  )
36
 
37
  print("Alfred agent ready with search and webpage tools!")
38
+
39
+ def __call__(self, question: str) -> str:
40
+ """
41
+ Permet d'appeler l'agent directement avec une question
42
+ """
43
+ try:
44
+ # Utiliser l'agent Alfred pour traiter la question
45
+ result = self.alfred.run(question)
46
+ return str(result)
47
+ except Exception as e:
48
+ return f"Erreur lors du traitement de la question: {str(e)}"
49
 
50
  def run_and_submit_all( profile: gr.OAuthProfile | None):
51
  """