wop commited on
Commit
7cf8d21
·
verified ·
1 Parent(s): 4eb73c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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.write(animated_text, end='') # Suppress newline
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("Answer: " + answer)
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