Spaces:
Running
Running
fix: type error
Browse files
app.py
CHANGED
@@ -237,8 +237,10 @@ def submit(sender_value, chatbot_value):
|
|
237 |
else:
|
238 |
reasoning_duration = 0.0
|
239 |
thought_cost_time = "0.00"
|
240 |
-
|
241 |
-
message_content[-2]["options"]
|
|
|
|
|
242 |
|
243 |
yield {chatbot: gr.update(value=chatbot_value)}
|
244 |
|
@@ -260,8 +262,9 @@ def submit(sender_value, chatbot_value):
|
|
260 |
thought_cost_time = "0.00"
|
261 |
else:
|
262 |
thought_cost_time = "{:.2f}".format(reasoning_duration)
|
263 |
-
message_content[-2]["options"]
|
264 |
-
|
|
|
265 |
|
266 |
chatbot_value[-1]["loading"] = False
|
267 |
yield {chatbot: gr.update(value=chatbot_value)}
|
|
|
237 |
else:
|
238 |
reasoning_duration = 0.0
|
239 |
thought_cost_time = "0.00"
|
240 |
+
# Simplify options structure
|
241 |
+
message_content[-2]["options"] = {
|
242 |
+
"title": f"End of Thought ({thought_cost_time}s)"
|
243 |
+
}
|
244 |
|
245 |
yield {chatbot: gr.update(value=chatbot_value)}
|
246 |
|
|
|
262 |
thought_cost_time = "0.00"
|
263 |
else:
|
264 |
thought_cost_time = "{:.2f}".format(reasoning_duration)
|
265 |
+
message_content[-2]["options"] = {
|
266 |
+
"title": f"End of Thought ({thought_cost_time}s)"
|
267 |
+
}
|
268 |
|
269 |
chatbot_value[-1]["loading"] = False
|
270 |
yield {chatbot: gr.update(value=chatbot_value)}
|