Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,8 @@ def main():
|
|
18 |
st.text("Message sent!")
|
19 |
|
20 |
st.text("Chat history:")
|
21 |
-
with open("chat.txt", "
|
|
|
22 |
chat_history = f.read()
|
23 |
st.text(chat_history)
|
24 |
|
@@ -31,7 +32,8 @@ def main():
|
|
31 |
t -= 1
|
32 |
if t == 0:
|
33 |
countdown.text("Time's up!")
|
34 |
-
with open("chat.txt", "
|
|
|
35 |
chat_history = f.read()
|
36 |
st.text(chat_history)
|
37 |
t = 60
|
|
|
18 |
st.text("Message sent!")
|
19 |
|
20 |
st.text("Chat history:")
|
21 |
+
with open("chat.txt", "a+") as f:
|
22 |
+
f.seek(0)
|
23 |
chat_history = f.read()
|
24 |
st.text(chat_history)
|
25 |
|
|
|
32 |
t -= 1
|
33 |
if t == 0:
|
34 |
countdown.text("Time's up!")
|
35 |
+
with open("chat.txt", "a+") as f:
|
36 |
+
f.seek(0)
|
37 |
chat_history = f.read()
|
38 |
st.text(chat_history)
|
39 |
t = 60
|