Commit ·
a2e16ec
1
Parent(s): 0719887
start
Browse files- .streamlit/config.toml +2 -1
- Dockerfile +1 -1
- __pycache__/app.cpython-312.pyc +0 -0
- app.py +2 -2
.streamlit/config.toml
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
[server]
|
| 2 |
-
enableCORS =
|
| 3 |
enableXsrfProtection = false
|
| 4 |
enableWebsocketCompression = false
|
|
|
|
| 5 |
|
|
|
|
| 1 |
[server]
|
| 2 |
+
enableCORS = false
|
| 3 |
enableXsrfProtection = false
|
| 4 |
enableWebsocketCompression = false
|
| 5 |
+
headless = true
|
| 6 |
|
Dockerfile
CHANGED
|
@@ -5,4 +5,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 5 |
COPY . .
|
| 6 |
RUN chmod -R 777 /app
|
| 7 |
EXPOSE 8501
|
| 8 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 5 |
COPY . .
|
| 6 |
RUN chmod -R 777 /app
|
| 7 |
EXPOSE 8501
|
| 8 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--server.headless=true"]
|
__pycache__/app.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-312.pyc and b/__pycache__/app.cpython-312.pyc differ
|
|
|
app.py
CHANGED
|
@@ -154,7 +154,7 @@ else:
|
|
| 154 |
plt.close(mpl_fig)
|
| 155 |
|
| 156 |
st.caption("3. Native chart (Altair)")
|
| 157 |
-
st.area_chart(df_cohorts
|
| 158 |
|
| 159 |
try:
|
| 160 |
st.caption("4. Plotly chart")
|
|
@@ -171,7 +171,7 @@ else:
|
|
| 171 |
|
| 172 |
# Guaranteed non-visual fallback for environments where JS charts are blocked.
|
| 173 |
with st.expander("Chart data preview"):
|
| 174 |
-
st.dataframe(df_cohorts,
|
| 175 |
|
| 176 |
# Проверка данных внизу
|
| 177 |
with st.expander("Raw Data"):
|
|
|
|
| 154 |
plt.close(mpl_fig)
|
| 155 |
|
| 156 |
st.caption("3. Native chart (Altair)")
|
| 157 |
+
st.area_chart(df_cohorts.set_index("cohort_day")["user_count"])
|
| 158 |
|
| 159 |
try:
|
| 160 |
st.caption("4. Plotly chart")
|
|
|
|
| 171 |
|
| 172 |
# Guaranteed non-visual fallback for environments where JS charts are blocked.
|
| 173 |
with st.expander("Chart data preview"):
|
| 174 |
+
st.dataframe(df_cohorts, use_container_width=True)
|
| 175 |
|
| 176 |
# Проверка данных внизу
|
| 177 |
with st.expander("Raw Data"):
|