Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,9 @@ def simulate_thinking_chat(message, history):
|
|
| 10 |
content="",
|
| 11 |
metadata={"title": "_Thinking_ step-by-step", "id": 0, "status": "pending"}
|
| 12 |
)
|
|
|
|
| 13 |
yield response
|
|
|
|
| 14 |
|
| 15 |
thoughts = [
|
| 16 |
"First, I need to understand the core aspects of the query...",
|
|
@@ -24,11 +26,15 @@ def simulate_thinking_chat(message, history):
|
|
| 24 |
time.sleep(sleep_time)
|
| 25 |
accumulated_thoughts += f"- {thought}\n\n"
|
| 26 |
response.content = accumulated_thoughts.strip()
|
|
|
|
| 27 |
yield response
|
|
|
|
| 28 |
|
| 29 |
response.metadata["status"] = "done"
|
| 30 |
response.metadata["duration"] = time.time() - start_time
|
|
|
|
| 31 |
yield response
|
|
|
|
| 32 |
|
| 33 |
time.sleep(5.0)
|
| 34 |
response = [
|
|
@@ -37,7 +43,9 @@ def simulate_thinking_chat(message, history):
|
|
| 37 |
content="Based on my thoughts and analysis above, my response is: This dummy repro shows how thoughts of a thinking LLM can be progressively shown before providing its final answer."
|
| 38 |
)
|
| 39 |
]
|
|
|
|
| 40 |
yield response
|
|
|
|
| 41 |
|
| 42 |
#response = ChatMessage(
|
| 43 |
# content="Based on my thoughts and analysis above, my response is: This dummy repro shows how thoughts of a thinking LLM can be progressively shown before providing its final answer."
|
|
|
|
| 10 |
content="",
|
| 11 |
metadata={"title": "_Thinking_ step-by-step", "id": 0, "status": "pending"}
|
| 12 |
)
|
| 13 |
+
print("one")
|
| 14 |
yield response
|
| 15 |
+
print("two")
|
| 16 |
|
| 17 |
thoughts = [
|
| 18 |
"First, I need to understand the core aspects of the query...",
|
|
|
|
| 26 |
time.sleep(sleep_time)
|
| 27 |
accumulated_thoughts += f"- {thought}\n\n"
|
| 28 |
response.content = accumulated_thoughts.strip()
|
| 29 |
+
print("three")
|
| 30 |
yield response
|
| 31 |
+
print("four")
|
| 32 |
|
| 33 |
response.metadata["status"] = "done"
|
| 34 |
response.metadata["duration"] = time.time() - start_time
|
| 35 |
+
print("five")
|
| 36 |
yield response
|
| 37 |
+
print("six")
|
| 38 |
|
| 39 |
time.sleep(5.0)
|
| 40 |
response = [
|
|
|
|
| 43 |
content="Based on my thoughts and analysis above, my response is: This dummy repro shows how thoughts of a thinking LLM can be progressively shown before providing its final answer."
|
| 44 |
)
|
| 45 |
]
|
| 46 |
+
print("seven")
|
| 47 |
yield response
|
| 48 |
+
print("eight")
|
| 49 |
|
| 50 |
#response = ChatMessage(
|
| 51 |
# content="Based on my thoughts and analysis above, my response is: This dummy repro shows how thoughts of a thinking LLM can be progressively shown before providing its final answer."
|