Spaces:
Sleeping
Sleeping
acecalisto3
commited on
Commit
•
624b560
1
Parent(s):
4afef10
Update app.py
Browse files
app.py
CHANGED
@@ -311,13 +311,11 @@ class AIAgent:
|
|
311 |
"""
|
312 |
Handles user input and executes the corresponding action.
|
313 |
"""
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
"action": action,
|
320 |
-
"input": " ".join(args),
|
321 |
"output": self.tools[action](" ".join(args))
|
322 |
})
|
323 |
else:
|
|
|
311 |
"""
|
312 |
Handles user input and executes the corresponding action.
|
313 |
"""
|
314 |
+
if input_str:
|
315 |
+
action, *args = input_str.split()
|
316 |
+
else:
|
317 |
+
# Handle empty input (e.g., display a message or do nothing)
|
318 |
+
print("Please provide input.")
|
|
|
|
|
319 |
"output": self.tools[action](" ".join(args))
|
320 |
})
|
321 |
else:
|