Lu032145 commited on
Commit
baaa037
·
verified ·
1 Parent(s): 2e90eaa

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +1 -2
Gradio_UI.py CHANGED
@@ -143,8 +143,7 @@ def stream_to_gradio(
143
  # Track tokens if model provides them
144
  if hasattr(agent.model, "last_input_token_count"):
145
  if agent.model.last_input_token_count is not None:
146
- total_input_tokens += agent.model.last_input_token_count
147
- total_output_tokens += agent.model.last_output_token_count
148
  if isinstance(step_log, ActionStep):
149
  step_log.input_token_count = agent.model.last_input_token_count
150
  step_log.output_token_count = agent.model.last_output_token_count
 
143
  # Track tokens if model provides them
144
  if hasattr(agent.model, "last_input_token_count"):
145
  if agent.model.last_input_token_count is not None:
146
+ total_output_tokens += agent.model.last_output_token_count
 
147
  if isinstance(step_log, ActionStep):
148
  step_log.input_token_count = agent.model.last_input_token_count
149
  step_log.output_token_count = agent.model.last_output_token_count