Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +43 -36
src/streamlit_app.py
CHANGED
|
@@ -26,42 +26,6 @@ from gliner import GLiNER
|
|
| 26 |
from streamlit_extras.stylable_container import stylable_container
|
| 27 |
|
| 28 |
|
| 29 |
-
# --- Conditional Mobile Warning ---
|
| 30 |
-
st.markdown(
|
| 31 |
-
"""
|
| 32 |
-
<style>
|
| 33 |
-
/* CSS Media Query: Only show the content inside this selector when the screen width is 600px or less (typical mobile size) */
|
| 34 |
-
@media (max-width: 600px) {
|
| 35 |
-
#mobile-warning-container {
|
| 36 |
-
display: block; /* Show the warning container */
|
| 37 |
-
background-color: #ffcccc; /* Light red/pink background */
|
| 38 |
-
color: #cc0000; /* Dark red text */
|
| 39 |
-
padding: 10px;
|
| 40 |
-
border-radius: 5px;
|
| 41 |
-
text-align: center;
|
| 42 |
-
margin-bottom: 20px;
|
| 43 |
-
font-weight: bold;
|
| 44 |
-
border: 1px solid #cc0000;
|
| 45 |
-
}
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
/* Hide the content by default (for larger screens) */
|
| 49 |
-
@media (min-width: 601px) {
|
| 50 |
-
#mobile-warning-container {
|
| 51 |
-
display: none; /* Hide the warning container on desktop */
|
| 52 |
-
}
|
| 53 |
-
}
|
| 54 |
-
</style>
|
| 55 |
-
|
| 56 |
-
<div id="mobile-warning-container">
|
| 57 |
-
⚠️ **Tip for Mobile Users:** For the best viewing experience of the charts and tables, please switch your browser to **"Desktop Site"** view.
|
| 58 |
-
</div>
|
| 59 |
-
""",
|
| 60 |
-
unsafe_allow_html=True
|
| 61 |
-
)
|
| 62 |
-
# ----------------------------------
|
| 63 |
-
|
| 64 |
-
|
| 65 |
|
| 66 |
|
| 67 |
|
|
@@ -481,6 +445,49 @@ def generate_html_report(df, text_input, elapsed_time, df_topic_data):
|
|
| 481 |
st.set_page_config(layout="wide", page_title="NER & Topic Report App")
|
| 482 |
|
| 483 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
st.markdown(
|
| 485 |
"""
|
| 486 |
<style>
|
|
|
|
| 26 |
from streamlit_extras.stylable_container import stylable_container
|
| 27 |
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
|
|
|
|
| 445 |
st.set_page_config(layout="wide", page_title="NER & Topic Report App")
|
| 446 |
|
| 447 |
|
| 448 |
+
# --- Conditional Mobile Warning ---
|
| 449 |
+
st.markdown(
|
| 450 |
+
"""
|
| 451 |
+
<style>
|
| 452 |
+
/* CSS Media Query: Only show the content inside this selector when the screen width is 600px or less (typical mobile size) */
|
| 453 |
+
@media (max-width: 600px) {
|
| 454 |
+
#mobile-warning-container {
|
| 455 |
+
display: block; /* Show the warning container */
|
| 456 |
+
background-color: #ffcccc; /* Light red/pink background */
|
| 457 |
+
color: #cc0000; /* Dark red text */
|
| 458 |
+
padding: 10px;
|
| 459 |
+
border-radius: 5px;
|
| 460 |
+
text-align: center;
|
| 461 |
+
margin-bottom: 20px;
|
| 462 |
+
font-weight: bold;
|
| 463 |
+
border: 1px solid #cc0000;
|
| 464 |
+
}
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
/* Hide the content by default (for larger screens) */
|
| 468 |
+
@media (min-width: 601px) {
|
| 469 |
+
#mobile-warning-container {
|
| 470 |
+
display: none; /* Hide the warning container on desktop */
|
| 471 |
+
}
|
| 472 |
+
}
|
| 473 |
+
</style>
|
| 474 |
+
|
| 475 |
+
<div id="mobile-warning-container">
|
| 476 |
+
⚠️ **Tip for Mobile Users:** For the best viewing experience of the charts and tables, please switch your browser to **"Desktop Site"** view.
|
| 477 |
+
</div>
|
| 478 |
+
""",
|
| 479 |
+
unsafe_allow_html=True
|
| 480 |
+
)
|
| 481 |
+
# ----------------------------------
|
| 482 |
+
|
| 483 |
+
|
| 484 |
+
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
|
| 491 |
st.markdown(
|
| 492 |
"""
|
| 493 |
<style>
|