selim-ba commited on
Commit
50b50f3
·
verified ·
1 Parent(s): d08ac2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -80,17 +80,19 @@ class SuperSmartAgent:
80
 
81
  return workflow.compile()
82
 
83
- def __call__(self, question: str) -> str:
84
  initial_state = AgentState(
85
  question=question,
86
  response="",
87
  is_reversed=False,
88
  is_riddle=False,
89
- is_python=False
 
90
  )
91
  final_state = self.graph.invoke(initial_state)
92
  return final_state["response"]
93
 
 
94
  def score_text(self, text):
95
  alnum_count = sum(c.isalnum() for c in text)
96
  space_count = text.count(' ')
 
80
 
81
  return workflow.compile()
82
 
83
+ def __call__(self, question: str, file_name: str | None = None) -> str:
84
  initial_state = AgentState(
85
  question=question,
86
  response="",
87
  is_reversed=False,
88
  is_riddle=False,
89
+ is_python=False,
90
+ file_name=file_name
91
  )
92
  final_state = self.graph.invoke(initial_state)
93
  return final_state["response"]
94
 
95
+
96
  def score_text(self, text):
97
  alnum_count = sum(c.isalnum() for c in text)
98
  space_count = text.count(' ')