f64
commited on
Commit
·
9cc36bf
1
Parent(s):
7768f6c
- CTAPT.py +2 -1
- pages/3_Загрузка CSV.py +1 -1
- pages/4_Просмотр_CSV.py +3 -2
- pages/{6_Plotly.py → 7.plotly.graph_objs.py} +2 -2
- pages/9_Таблица_результатов.py +6 -1
CTAPT.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
import os, re, sys, time, math, shutil, urllib, string, random, pickle, zipfile, datetime
|
| 2 |
import streamlit as st, pandas as pd, numpy as np
|
| 3 |
|
| 4 |
-
st.set_page_config(page_title="Предсказание V", page_icon="🦋", layout="wide"
|
|
|
|
| 5 |
|
| 6 |
import my_static_methods as my_stm
|
| 7 |
st.html(my_stm.STYLE_CORRECTION)
|
|
|
|
| 1 |
import os, re, sys, time, math, shutil, urllib, string, random, pickle, zipfile, datetime
|
| 2 |
import streamlit as st, pandas as pd, numpy as np
|
| 3 |
|
| 4 |
+
st.set_page_config(page_title="Предсказание V", page_icon="🦋", layout="wide", initial_sidebar_state="expanded")
|
| 5 |
+
# set_page_config() can only be called once per app page, and must be called as the first Streamlit command in your script.
|
| 6 |
|
| 7 |
import my_static_methods as my_stm
|
| 8 |
st.html(my_stm.STYLE_CORRECTION)
|
pages/3_Загрузка CSV.py
CHANGED
|
@@ -5,7 +5,7 @@ import my_static_methods as my_stm
|
|
| 5 |
st.html(my_stm.STYLE_CORRECTION)
|
| 6 |
REPO = my_stm.HfRepo("f64k/gaziev", "dataset", st.secrets["HF_WRITE"])
|
| 7 |
|
| 8 |
-
st.sidebar.markdown("
|
| 9 |
|
| 10 |
def st_rerun():
|
| 11 |
try:
|
|
|
|
| 5 |
st.html(my_stm.STYLE_CORRECTION)
|
| 6 |
REPO = my_stm.HfRepo("f64k/gaziev", "dataset", st.secrets["HF_WRITE"])
|
| 7 |
|
| 8 |
+
st.sidebar.markdown("# загрузка 💾")
|
| 9 |
|
| 10 |
def st_rerun():
|
| 11 |
try:
|
pages/4_Просмотр_CSV.py
CHANGED
|
@@ -10,7 +10,7 @@ st.html(my_stm.STYLE_CORRECTION)
|
|
| 10 |
|
| 11 |
|
| 12 |
REPO = my_stm.HfRepo("f64k/gaziev", "dataset", st.secrets["HF_WRITE"])
|
| 13 |
-
st.sidebar.info("
|
| 14 |
|
| 15 |
lstTestFiles = my_stm.list_files_hf(REPO)
|
| 16 |
#dictXYZV = my_stm.load_gaziev_from_hf(REPO, lstTestFiles)
|
|
@@ -25,7 +25,8 @@ if one_file_selected:
|
|
| 25 |
df_xyz = list(dict_ONE_XYZV.values())[0] #df_xyz = dictXYZV[key_xyz]
|
| 26 |
fig = my_stm.plotly_xyzv_scatter_gray(df_xyz)
|
| 27 |
cols[0].plotly_chart(fig) # st.plotly_chart(fig) #fig.show()
|
| 28 |
-
|
|
|
|
| 29 |
cols[1].dataframe(df_xyz, height=700)
|
| 30 |
|
| 31 |
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
REPO = my_stm.HfRepo("f64k/gaziev", "dataset", st.secrets["HF_WRITE"])
|
| 13 |
+
st.sidebar.info("🧊💽 сохраненные\n таблицы CSV")
|
| 14 |
|
| 15 |
lstTestFiles = my_stm.list_files_hf(REPO)
|
| 16 |
#dictXYZV = my_stm.load_gaziev_from_hf(REPO, lstTestFiles)
|
|
|
|
| 25 |
df_xyz = list(dict_ONE_XYZV.values())[0] #df_xyz = dictXYZV[key_xyz]
|
| 26 |
fig = my_stm.plotly_xyzv_scatter_gray(df_xyz)
|
| 27 |
cols[0].plotly_chart(fig) # st.plotly_chart(fig) #fig.show()
|
| 28 |
+
lstValues = sorted(set(df_xyz.notna().sum()), reverse=True)
|
| 29 |
+
cols[1].info(f"Всего записей : {lstValues[0]}; Значений V : {lstValues[1]}")
|
| 30 |
cols[1].dataframe(df_xyz, height=700)
|
| 31 |
|
| 32 |
|
pages/{6_Plotly.py → 7.plotly.graph_objs.py}
RENAMED
|
@@ -2,11 +2,11 @@ import streamlit as st, pandas as pd, numpy as np
|
|
| 2 |
import my_static_methods as my_stm
|
| 3 |
st.html(my_stm.STYLE_CORRECTION)
|
| 4 |
|
| 5 |
-
st.sidebar.markdown("# ПРИМЕР : интерактивные графики на Plotly 📊")
|
| 6 |
-
|
| 7 |
import plotly.figure_factory as ff
|
| 8 |
import plotly.graph_objs as go
|
| 9 |
|
|
|
|
|
|
|
| 10 |
n = 80 # 200
|
| 11 |
# Add histogram data
|
| 12 |
x1 = np.random.randn(n) # - 2
|
|
|
|
| 2 |
import my_static_methods as my_stm
|
| 3 |
st.html(my_stm.STYLE_CORRECTION)
|
| 4 |
|
|
|
|
|
|
|
| 5 |
import plotly.figure_factory as ff
|
| 6 |
import plotly.graph_objs as go
|
| 7 |
|
| 8 |
+
st.sidebar.markdown("# ПРИМЕР : интерактивные графики на Plotly plotly.graph_objs 📊")
|
| 9 |
+
|
| 10 |
n = 80 # 200
|
| 11 |
# Add histogram data
|
| 12 |
x1 = np.random.randn(n) # - 2
|
pages/9_Таблица_результатов.py
CHANGED
|
@@ -4,4 +4,9 @@ st.markdown(my_stm.STYLE_CORRECTION, unsafe_allow_html=True)
|
|
| 4 |
|
| 5 |
st.sidebar.markdown("### просто таблица случайных чисел - пока заглушка ❄️")
|
| 6 |
pop = st.sidebar.popover("Open popover")
|
| 7 |
-
pop.dataframe(my_stm.df_random_dataframe())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
st.sidebar.markdown("### просто таблица случайных чисел - пока заглушка ❄️")
|
| 6 |
pop = st.sidebar.popover("Open popover")
|
| 7 |
+
pop.dataframe(my_stm.df_random_dataframe())
|
| 8 |
+
|
| 9 |
+
expand = st.expander("My label", icon=":material/info:")
|
| 10 |
+
expand.write("Inside the expander.")
|
| 11 |
+
pop = st.popover("Button label")
|
| 12 |
+
pop.checkbox("Show all")
|