Spaces:
Running
on
Zero
Running
on
Zero
Fixes heading
Browse files
main.py
CHANGED
@@ -89,6 +89,7 @@ def chat(prompt, history):
|
|
89 |
buffer = ""
|
90 |
reasoning = ""
|
91 |
thinking = False
|
|
|
92 |
|
93 |
for new_text in streamer:
|
94 |
if not thinking and "<think>" in new_text:
|
@@ -100,12 +101,14 @@ def chat(prompt, history):
|
|
100 |
|
101 |
if thinking:
|
102 |
reasoning += new_text
|
103 |
-
|
104 |
-
|
|
|
|
|
105 |
continue
|
106 |
|
107 |
buffer += new_text
|
108 |
-
yield reformat_math(buffer), reasoning
|
109 |
|
110 |
|
111 |
chat_bot = gr.Chatbot(
|
|
|
89 |
buffer = ""
|
90 |
reasoning = ""
|
91 |
thinking = False
|
92 |
+
reasoning_heading = "# Reasoning\n\n"
|
93 |
|
94 |
for new_text in streamer:
|
95 |
if not thinking and "<think>" in new_text:
|
|
|
101 |
|
102 |
if thinking:
|
103 |
reasoning += new_text
|
104 |
+
yield (
|
105 |
+
"I'm thinking, please wait a moment...",
|
106 |
+
reasoning_heading + reasoning,
|
107 |
+
)
|
108 |
continue
|
109 |
|
110 |
buffer += new_text
|
111 |
+
yield reformat_math(buffer), reasoning_heading + reasoning
|
112 |
|
113 |
|
114 |
chat_bot = gr.Chatbot(
|