Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,5 +72,11 @@ agent = CodeAgent(
|
|
72 |
prompt_templates=prompt_templates
|
73 |
)
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
GradioUI(agent).launch()
|
|
|
72 |
prompt_templates=prompt_templates
|
73 |
)
|
74 |
|
75 |
+
if agent.model.last_input_token_count is not None:
|
76 |
+
total_input_tokens += agent.model.last_input_token_count
|
77 |
+
else:
|
78 |
+
# Handle the case where last_input_token_count is None
|
79 |
+
# For example, you can set total_input_tokens to a default value
|
80 |
+
total_input_tokens = 0
|
81 |
|
82 |
GradioUI(agent).launch()
|