Spaces:
Sleeping
Sleeping
Update Gradio_UI.py
Browse filesavoid TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
140 unmodified lines141142143144145146147140 unmodified linesfor step_log in agent.run(task, stream=True, reset=reset_agent_memory, additional_args=additional_args):# Track tokens if model provides themif hasattr(agent.model, "last_input_token_count"):total_input_tokens += agent.model.last_input_token_counttotal_output_tokens += agent.model.last_output_token_countif isinstance(step_log, ActionStep):140 unmodified lines141142143144145146147140 unmodified linesfor step_log in agent.run(task, stream=True, reset=reset_agent_memory, additional_args=additional_args):# Track tokens if model provides themif hasattr(agent.model, "last_input_token_count") and agent.model.last_input_token_count is not None:total_input_tokens += agent.model.last_input_token_counttotal_output_tokens += agent.model.last_output_token_countif isinstance(step_log, ActionStep):
Gradio_UI.py+1-1