kambris commited on
Commit
97ee6bf
·
verified ·
1 Parent(s): 693e6e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -14,6 +14,8 @@ import folium
14
  import country_converter as coco
15
  import time
16
 
 
 
17
 
18
  current_dir = os.path.dirname(os.path.abspath(__file__))
19
  font_path = os.path.join(current_dir, "ArabicR2013-J25x.ttf")
@@ -97,13 +99,7 @@ st.set_page_config(
97
  layout="wide"
98
  )
99
 
100
- timer_placeholder = st.sidebar.empty()
101
- start_time = time.time()
102
-
103
- while True:
104
- elapsed = int(time.time() - start_time)
105
- timer_placeholder.markdown(f"⏱️ Time Elapsed: {elapsed} seconds")
106
- time.sleep(1)
107
 
108
  @st.cache_resource
109
  def load_models():
 
14
  import country_converter as coco
15
  import time
16
 
17
+ if 'start_time' not in st.session_state:
18
+ st.session_state.start_time = time.time()
19
 
20
  current_dir = os.path.dirname(os.path.abspath(__file__))
21
  font_path = os.path.join(current_dir, "ArabicR2013-J25x.ttf")
 
99
  layout="wide"
100
  )
101
 
102
+ st.text(f"⏱️ {int(time.time() - st.session_state.start_time)}s")
 
 
 
 
 
 
103
 
104
  @st.cache_resource
105
  def load_models():