Spaces:
Running
Running
fix: bool type error
Browse files- app.py +3 -8
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -187,8 +187,6 @@ def submit(sender_value, chatbot_value):
|
|
| 187 |
|
| 188 |
# Reasoning content (tool type)
|
| 189 |
message_content.append({
|
| 190 |
-
"copyable": "false",
|
| 191 |
-
"editable": "false",
|
| 192 |
"type": "tool",
|
| 193 |
"content": "",
|
| 194 |
"options": {
|
|
@@ -237,9 +235,7 @@ def submit(sender_value, chatbot_value):
|
|
| 237 |
else:
|
| 238 |
reasoning_duration = 0.0
|
| 239 |
thought_cost_time = "0.00"
|
| 240 |
-
message_content[-2]["options"] = {
|
| 241 |
-
"title": f"End of Thought ({thought_cost_time}s)"
|
| 242 |
-
}
|
| 243 |
|
| 244 |
yield {chatbot: gr.update(value=chatbot_value)}
|
| 245 |
|
|
@@ -261,9 +257,7 @@ def submit(sender_value, chatbot_value):
|
|
| 261 |
thought_cost_time = "0.00"
|
| 262 |
else:
|
| 263 |
thought_cost_time = "{:.2f}".format(reasoning_duration)
|
| 264 |
-
message_content[-2]["options"] = {
|
| 265 |
-
"title": f"End of Thought ({thought_cost_time}s)"
|
| 266 |
-
}
|
| 267 |
|
| 268 |
chatbot_value[-1]["loading"] = False
|
| 269 |
yield {chatbot: gr.update(value=chatbot_value)}
|
|
@@ -292,6 +286,7 @@ with gr.Blocks() as demo, ms.Application(), antdx.XProvider():
|
|
| 292 |
with antd.Flex(vertical=True, gap="middle"):
|
| 293 |
chatbot = pro.Chatbot(
|
| 294 |
height="calc(100vh - 200px)",
|
|
|
|
| 295 |
welcome_config=ChatbotWelcomeConfig(
|
| 296 |
variant="borderless",
|
| 297 |
icon="./assets/minimax-logo.png",
|
|
|
|
| 187 |
|
| 188 |
# Reasoning content (tool type)
|
| 189 |
message_content.append({
|
|
|
|
|
|
|
| 190 |
"type": "tool",
|
| 191 |
"content": "",
|
| 192 |
"options": {
|
|
|
|
| 235 |
else:
|
| 236 |
reasoning_duration = 0.0
|
| 237 |
thought_cost_time = "0.00"
|
| 238 |
+
message_content[-2]["options"] = {"title": f"End of Thought ({thought_cost_time}s)"}
|
|
|
|
|
|
|
| 239 |
|
| 240 |
yield {chatbot: gr.update(value=chatbot_value)}
|
| 241 |
|
|
|
|
| 257 |
thought_cost_time = "0.00"
|
| 258 |
else:
|
| 259 |
thought_cost_time = "{:.2f}".format(reasoning_duration)
|
| 260 |
+
message_content[-2]["options"] = {"title": f"End of Thought ({thought_cost_time}s)"}
|
|
|
|
|
|
|
| 261 |
|
| 262 |
chatbot_value[-1]["loading"] = False
|
| 263 |
yield {chatbot: gr.update(value=chatbot_value)}
|
|
|
|
| 286 |
with antd.Flex(vertical=True, gap="middle"):
|
| 287 |
chatbot = pro.Chatbot(
|
| 288 |
height="calc(100vh - 200px)",
|
| 289 |
+
markdown_config=ChatbotMarkdownConfig(allow_tags=["think"]),
|
| 290 |
welcome_config=ChatbotWelcomeConfig(
|
| 291 |
variant="borderless",
|
| 292 |
icon="./assets/minimax-logo.png",
|
requirements.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
gradio
|
| 2 |
requests
|
| 3 |
-
modelscope_studio
|
|
|
|
| 1 |
gradio
|
| 2 |
requests
|
| 3 |
+
modelscope_studio==1.4.0
|