Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,8 +51,14 @@ def search(query):
|
|
51 |
"tool_names": ", ".join([tool.name for tool in tools]),
|
52 |
"intermediate_steps": [] # Initial empty intermediate steps
|
53 |
}
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
# Create the Gradio interface
|
58 |
iface = gr.Interface(
|
|
|
51 |
"tool_names": ", ".join([tool.name for tool in tools]),
|
52 |
"intermediate_steps": [] # Initial empty intermediate steps
|
53 |
}
|
54 |
+
try:
|
55 |
+
output = agent.invoke(inputs)
|
56 |
+
return output
|
57 |
+
except Exception as e:
|
58 |
+
# Print the exception and the inputs for debugging
|
59 |
+
print(f"Error: {e}")
|
60 |
+
print("Inputs:", inputs)
|
61 |
+
return str(e)
|
62 |
|
63 |
# Create the Gradio interface
|
64 |
iface = gr.Interface(
|