Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,6 @@ import folium
|
|
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")
|
22 |
|
@@ -99,7 +96,28 @@ st.set_page_config(
|
|
99 |
layout="wide"
|
100 |
)
|
101 |
|
102 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
@st.cache_resource
|
105 |
def load_models():
|
|
|
14 |
import country_converter as coco
|
15 |
import time
|
16 |
|
|
|
|
|
|
|
17 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
18 |
font_path = os.path.join(current_dir, "ArabicR2013-J25x.ttf")
|
19 |
|
|
|
96 |
layout="wide"
|
97 |
)
|
98 |
|
99 |
+
st.set_page_config(
|
100 |
+
page_title="Arabic Poem Analysis",
|
101 |
+
page_icon="📚",
|
102 |
+
layout="wide"
|
103 |
+
)
|
104 |
+
|
105 |
+
# Initialize timer
|
106 |
+
if 'start_time' not in st.session_state:
|
107 |
+
st.session_state.start_time = time.time()
|
108 |
+
|
109 |
+
def get_elapsed_time():
|
110 |
+
current_time = time.time()
|
111 |
+
elapsed = current_time - st.session_state.start_time
|
112 |
+
return int(elapsed)
|
113 |
+
|
114 |
+
# Create timer display
|
115 |
+
timer_placeholder = st.empty()
|
116 |
+
|
117 |
+
# Update timer (place this in a separate thread or use st.rerun())
|
118 |
+
elapsed = get_elapsed_time()
|
119 |
+
timer_placeholder.markdown(f"⏱️ Time elapsed: {elapsed} seconds")
|
120 |
+
|
121 |
|
122 |
@st.cache_resource
|
123 |
def load_models():
|