Lu032145 commited on
Commit
22d30f2
·
verified ·
1 Parent(s): a276056

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +1 -1
Gradio_UI.py CHANGED
@@ -143,7 +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
 
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