Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,8 @@ def animate_typing(text):
|
|
27 |
animated_text = ""
|
28 |
for char in text:
|
29 |
animated_text += char
|
30 |
-
st.
|
31 |
time.sleep(0.05)
|
32 |
-
st.write("") # Write newline after animation completes
|
33 |
|
34 |
def main():
|
35 |
st.title("Question Answering System")
|
@@ -42,7 +41,7 @@ def main():
|
|
42 |
answer_placeholder.write("Thinking...")
|
43 |
answer = ask_question(question)
|
44 |
answer_placeholder.empty()
|
45 |
-
animate_typing(
|
46 |
else:
|
47 |
st.write("Please enter a question.")
|
48 |
|
|
|
27 |
animated_text = ""
|
28 |
for char in text:
|
29 |
animated_text += char
|
30 |
+
st.text("Answer: " + animated_text)
|
31 |
time.sleep(0.05)
|
|
|
32 |
|
33 |
def main():
|
34 |
st.title("Question Answering System")
|
|
|
41 |
answer_placeholder.write("Thinking...")
|
42 |
answer = ask_question(question)
|
43 |
answer_placeholder.empty()
|
44 |
+
animate_typing(answer)
|
45 |
else:
|
46 |
st.write("Please enter a question.")
|
47 |
|