awacke1 commited on
Commit
7108100
1 Parent(s): 042df05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -65,4 +65,24 @@ def main():
65
  t = 60
66
  while t:
67
  mins, secs = divmod(t, 60)
68
- countdown.text(f"Time remaining: {mins
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  t = 60
66
  while t:
67
  mins, secs = divmod(t, 60)
68
+ countdown.text(f"Time remaining: {mins:02d}:{secs:02d}")
69
+ time.sleep(1)
70
+ t -= 1
71
+ if t == 0:
72
+ countdown.text("Time's up!")
73
+ with open("chat.txt", "a+") as f:
74
+ f.seek(0)
75
+ chat_history = f.read()
76
+
77
+ # Wrap text in the chat history
78
+ wrapped_chat_history = "<br>".join(chat_history.split("\n"))
79
+
80
+ # Render chat history using the html component
81
+ html_component(f"<pre style='white-space: pre-wrap;'>{wrapped_chat_history}</pre>")
82
+
83
+ press_release()
84
+
85
+ t = 60
86
+
87
+ if __name__ == "__main__":
88
+ main()