Muthuraja18 commited on
Commit
affb4ea
·
verified ·
1 Parent(s): 1ba983d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -921,9 +921,6 @@ def create_game(host=None, topics=[], num_questions=5, auto_close=True, ai_topic
921
  # PLAY PAGE
922
  # -------------------------
923
  def play_page():
924
- import time, json
925
- import streamlit as st
926
-
927
  gid = st.session_state.get("active_game_id")
928
  uname = st.session_state.get("username")
929
 
@@ -970,7 +967,7 @@ def play_page():
970
  st.subheader(f"Question {idx + 1}/{len(questions)}")
971
  st.write(q["question"])
972
 
973
- start_time = st.session_state.question_started_at
974
  elapsed = int(time.time() - start_time)
975
  time_limit = 15
976
  st.markdown(f"**⏱ Time left:** {max(0, time_limit - elapsed)} seconds")
 
921
  # PLAY PAGE
922
  # -------------------------
923
  def play_page():
 
 
 
924
  gid = st.session_state.get("active_game_id")
925
  uname = st.session_state.get("username")
926
 
 
967
  st.subheader(f"Question {idx + 1}/{len(questions)}")
968
  st.write(q["question"])
969
 
970
+ start_time = st.session_state.get("question_started_at")
971
  elapsed = int(time.time() - start_time)
972
  time_limit = 15
973
  st.markdown(f"**⏱ Time left:** {max(0, time_limit - elapsed)} seconds")