Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,10 @@ def ask_question(question):
|
|
24 |
return "Error: Failed to retrieve an answer."
|
25 |
|
26 |
def animate_typing(text):
|
|
|
27 |
for char in text:
|
28 |
-
|
|
|
29 |
time.sleep(0.05)
|
30 |
st.write("")
|
31 |
|
|
|
24 |
return "Error: Failed to retrieve an answer."
|
25 |
|
26 |
def animate_typing(text):
|
27 |
+
animated_text = ""
|
28 |
for char in text:
|
29 |
+
animated_text += char
|
30 |
+
st.write(animated_text, end='', flush=True)
|
31 |
time.sleep(0.05)
|
32 |
st.write("")
|
33 |
|