Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ import streamlit.components.v1 as components
|
|
17 |
from gradio_client import Client
|
18 |
from streamlit_marquee import streamlit_marquee
|
19 |
import folium
|
20 |
-
from streamlit_folium import st_folium #
|
21 |
import glob
|
22 |
import pytz
|
23 |
from collections import defaultdict
|
@@ -285,6 +285,10 @@ async def broadcast_message(message, room_id):
|
|
285 |
# -----------------------------
|
286 |
# Session State Initialization
|
287 |
# -----------------------------
|
|
|
|
|
|
|
|
|
288 |
def init_session_state():
|
289 |
defaults = {
|
290 |
'server_running': False, 'server_task': None, 'active_connections': {},
|
@@ -754,7 +758,7 @@ def main():
|
|
754 |
st.session_state.last_activity = time.time()
|
755 |
st.success(f"π +10 points! New Score: ${st.session_state.score}")
|
756 |
|
757 |
-
# Display Quest Log as a
|
758 |
chat_content = asyncio.run(load_chat())
|
759 |
st.code("\n".join(chat_content[-10:]), language="python")
|
760 |
|
|
|
17 |
from gradio_client import Client
|
18 |
from streamlit_marquee import streamlit_marquee
|
19 |
import folium
|
20 |
+
from streamlit_folium import st_folium # Use st_folium instead of folium_static
|
21 |
import glob
|
22 |
import pytz
|
23 |
from collections import defaultdict
|
|
|
285 |
# -----------------------------
|
286 |
# Session State Initialization
|
287 |
# -----------------------------
|
288 |
+
# Define global variables for player attributes.
|
289 |
+
player_color = None
|
290 |
+
player_shape = None
|
291 |
+
|
292 |
def init_session_state():
|
293 |
defaults = {
|
294 |
'server_running': False, 'server_task': None, 'active_connections': {},
|
|
|
758 |
st.session_state.last_activity = time.time()
|
759 |
st.success(f"π +10 points! New Score: ${st.session_state.score}")
|
760 |
|
761 |
+
# Display Quest Log as a code block (with Python formatting)
|
762 |
chat_content = asyncio.run(load_chat())
|
763 |
st.code("\n".join(chat_content[-10:]), language="python")
|
764 |
|