eli-the-pooh commited on
Commit
1df8846
·
verified ·
1 Parent(s): 20933fc

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +5 -1
Gradio_UI.py CHANGED
@@ -148,7 +148,11 @@ def stream_to_gradio(
148
  input_tokens = agent.model.last_input_token_count or 0
149
  total_input_tokens += input_tokens
150
 
151
- total_output_tokens += agent.model.last_output_token_count
 
 
 
 
152
  if isinstance(step_log, ActionStep):
153
  step_log.input_token_count = agent.model.last_input_token_count
154
  step_log.output_token_count = agent.model.last_output_token_count
 
148
  input_tokens = agent.model.last_input_token_count or 0
149
  total_input_tokens += input_tokens
150
 
151
+ # total_output_tokens += agent.model.last_output_token_count
152
+ output_tokens = agent.model.last_output_token_count or 0
153
+ total_output_tokens += output_tokens
154
+
155
+
156
  if isinstance(step_log, ActionStep):
157
  step_log.input_token_count = agent.model.last_input_token_count
158
  step_log.output_token_count = agent.model.last_output_token_count