Spaces:
Paused
Paused
Maryam Ilka commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -660,8 +660,8 @@ def thank_you_page():
|
|
| 660 |
|
| 661 |
# ========== مدیریت وضعیت و صفحهبندی ==========
|
| 662 |
def main():
|
| 663 |
-
# تشخیص دستگاه
|
| 664 |
-
user_agent = st.
|
| 665 |
st.session_state.is_desktop = "mobile" not in user_agent.lower()
|
| 666 |
|
| 667 |
if 'current_page' not in st.session_state:
|
|
|
|
| 660 |
|
| 661 |
# ========== مدیریت وضعیت و صفحهبندی ==========
|
| 662 |
def main():
|
| 663 |
+
# تشخیص دستگاه با استفاده از st.query_params جدید
|
| 664 |
+
user_agent = st.query_params.get("user_agent", [""])[0]
|
| 665 |
st.session_state.is_desktop = "mobile" not in user_agent.lower()
|
| 666 |
|
| 667 |
if 'current_page' not in st.session_state:
|