Spaces:
Running
Running
Commit
Β·
146e2e7
1
Parent(s):
8cc36f6
Update page1.py
Browse files
page1.py
CHANGED
@@ -14,15 +14,15 @@ def text():
|
|
14 |
full_response = ""
|
15 |
assistant_response = random.choice(
|
16 |
[
|
17 |
-
"Hello there! How can I assist you today?",
|
18 |
-
"Hi, human! Is there anything I can help you with?",
|
19 |
"Do you need help?"
|
20 |
]
|
21 |
)
|
22 |
# Simulate stream of response with milliseconds delay
|
23 |
for chunk in assistant_response.split():
|
24 |
full_response += chunk + " "
|
25 |
-
time.sleep(0.
|
26 |
# Add a blinking cursor to simulate typing
|
27 |
message_placeholder.markdown(full_response + "β")
|
28 |
message_placeholder.markdown(full_response)
|
|
|
14 |
full_response = ""
|
15 |
assistant_response = random.choice(
|
16 |
[
|
17 |
+
"Helloπ there! How can I assist you today?",
|
18 |
+
"Hi , human! Is there anything I can help you with?",
|
19 |
"Do you need help?"
|
20 |
]
|
21 |
)
|
22 |
# Simulate stream of response with milliseconds delay
|
23 |
for chunk in assistant_response.split():
|
24 |
full_response += chunk + " "
|
25 |
+
time.sleep(0.1)
|
26 |
# Add a blinking cursor to simulate typing
|
27 |
message_placeholder.markdown(full_response + "β")
|
28 |
message_placeholder.markdown(full_response)
|