Update app.py
Browse files
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,
|
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": "",
|