Mhammad2023 commited on
Commit
d006a01
·
verified ·
1 Parent(s): cf7e5db

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +2 -8
Gradio_UI.py CHANGED
@@ -145,14 +145,8 @@ def stream_to_gradio(
145
  # token_count = agent.model.last_input_token_count or 0
146
  # total_input_tokens += token_count
147
 
148
- # total_input_tokens += agent.model.last_input_token_count
149
- # total_output_tokens += agent.model.last_output_token_count
150
-
151
- input_tokens = agent.model.last_input_token_count or 0
152
- output_tokens = agent.model.last_output_token_count or 0
153
- total_input_tokens += input_tokens
154
- total_output_tokens += output_tokens
155
-
156
 
157
  # if agent.model.last_output_token_count is not None:
158
  # total_output_tokens += agent.model.last_output_token_count
 
145
  # token_count = agent.model.last_input_token_count or 0
146
  # total_input_tokens += token_count
147
 
148
+ total_input_tokens += agent.model.last_input_token_count
149
+ total_output_tokens += agent.model.last_output_token_count
 
 
 
 
 
 
150
 
151
  # if agent.model.last_output_token_count is not None:
152
  # total_output_tokens += agent.model.last_output_token_count