naman1102 commited on
Commit
6341f90
·
1 Parent(s): 23a6007

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -21,7 +21,7 @@ HF_TOKEN = os.getenv("HF_TOKEN") # Make sure to set this environment variable
21
 
22
 
23
  class AgentState(TypedDict):
24
- question: Annotated[str, "input"]
25
  current_step: Annotated[str, "input"]
26
  tool_output: Annotated[str, "input"]
27
  final_answer: Annotated[str, "input"]
@@ -179,7 +179,7 @@ Do not include any other text or explanation. Only return the dictionary.
179
  try:
180
  # Initialize the state
181
  initial_state: AgentState = {
182
- "question": question,
183
  "current_step": "analyze",
184
  "tool_output": "",
185
  "final_answer": "",
@@ -264,7 +264,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
264
  try:
265
  # Initialize the state for this question
266
  initial_state = {
267
- "question": question_text,
268
  "current_step": "analyze",
269
  "tool_output": "",
270
  "final_answer": "",
 
21
 
22
 
23
  class AgentState(TypedDict):
24
+ question: Annotated[List[str], operator.add]
25
  current_step: Annotated[str, "input"]
26
  tool_output: Annotated[str, "input"]
27
  final_answer: Annotated[str, "input"]
 
179
  try:
180
  # Initialize the state
181
  initial_state: AgentState = {
182
+ "question": [question], # Initialize as a list with one question
183
  "current_step": "analyze",
184
  "tool_output": "",
185
  "final_answer": "",
 
264
  try:
265
  # Initialize the state for this question
266
  initial_state = {
267
+ "question": [question_text], # Initialize as a list with one question
268
  "current_step": "analyze",
269
  "tool_output": "",
270
  "final_answer": "",