Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse files- Gradio_UI.py +1 -1
Gradio_UI.py
CHANGED
|
@@ -140,7 +140,7 @@ def stream_to_gradio(
|
|
| 140 |
total_output_tokens = 0
|
| 141 |
|
| 142 |
def _as_int(x):
|
| 143 |
-
|
| 144 |
|
| 145 |
for step_log in agent.run(task, stream=True, reset=reset_agent_memory, additional_args=additional_args):
|
| 146 |
# Track tokens if model provides them
|
|
|
|
| 140 |
total_output_tokens = 0
|
| 141 |
|
| 142 |
def _as_int(x):
|
| 143 |
+
return x if isinstance(x, int) else 0
|
| 144 |
|
| 145 |
for step_log in agent.run(task, stream=True, reset=reset_agent_memory, additional_args=additional_args):
|
| 146 |
# Track tokens if model provides them
|