Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -115,10 +115,11 @@ def chat_llama3_8b(message: str,
|
|
115 |
# Send the "thinking" message once text starts generating
|
116 |
if not thinking_message_sent:
|
117 |
thinking_message_sent = True
|
118 |
-
yield "A.I. Healthcare is Thinking...\n\n"
|
119 |
|
120 |
# Wait until </think> is detected before streaming output
|
121 |
if not think_detected:
|
|
|
122 |
if "</think>" in buffer:
|
123 |
think_detected = True
|
124 |
buffer = buffer.split("</think>", 1)[1] # Remove <think> section
|
|
|
115 |
# Send the "thinking" message once text starts generating
|
116 |
if not thinking_message_sent:
|
117 |
thinking_message_sent = True
|
118 |
+
yield "A.I. Healthcare is Thinking... Please wait...\n\n"
|
119 |
|
120 |
# Wait until </think> is detected before streaming output
|
121 |
if not think_detected:
|
122 |
+
print(buffer)
|
123 |
if "</think>" in buffer:
|
124 |
think_detected = True
|
125 |
buffer = buffer.split("</think>", 1)[1] # Remove <think> section
|