f64 commited on
Commit ·
c05f881
1
Parent(s): 3dfed1e
- my_static_methods.py +1 -1
- pages/7_итоги.py +5 -4
my_static_methods.py
CHANGED
|
@@ -40,7 +40,7 @@ def list_files_hf(repo_Id: str) -> list[str]:
|
|
| 40 |
lst = [fname for fname in map(os.path.basename, lst) if fname[0] != "."]
|
| 41 |
return lst
|
| 42 |
|
| 43 |
-
def plotly_xyzv_scatter_gray(df3D)
|
| 44 |
color_discrete_map = dict(o='rgb(220,220,220)', p='rgb(90,1,1)', n='rgb(1,1,90)')
|
| 45 |
fig = px.scatter_3d(df3D, x='X', y='Y', z='Z', color="Vposneg", opacity=0.4, height=800, color_discrete_map=color_discrete_map)
|
| 46 |
fig.update_scenes(xaxis={"gridcolor":"rgba(30, 0, 0, 0.2)","color":"rgb(100, 0, 0)","showbackground":False},
|
|
|
|
| 40 |
lst = [fname for fname in map(os.path.basename, lst) if fname[0] != "."]
|
| 41 |
return lst
|
| 42 |
|
| 43 |
+
def plotly_xyzv_scatter_gray(df3D):
|
| 44 |
color_discrete_map = dict(o='rgb(220,220,220)', p='rgb(90,1,1)', n='rgb(1,1,90)')
|
| 45 |
fig = px.scatter_3d(df3D, x='X', y='Y', z='Z', color="Vposneg", opacity=0.4, height=800, color_discrete_map=color_discrete_map)
|
| 46 |
fig.update_scenes(xaxis={"gridcolor":"rgba(30, 0, 0, 0.2)","color":"rgb(100, 0, 0)","showbackground":False},
|
pages/7_итоги.py
CHANGED
|
@@ -19,12 +19,13 @@ col1.write(lstTestFiles)
|
|
| 19 |
dictXYZV = my_stm.load_gaziev_from_hf(REPO_ID, lstTestFiles)
|
| 20 |
|
| 21 |
key_xyz = st.selectbox("Выберите файл данных для просмотра таблицы и точек", dictXYZV.keys())
|
| 22 |
-
|
|
|
|
| 23 |
|
| 24 |
-
col1.dataframe(df_xyz)
|
| 25 |
|
| 26 |
-
fig = my_stm.plotly_xyzv_scatter_gray(df_xyz)
|
| 27 |
-
col2.plotly_chart(fig) # st.plotly_chart(fig) #fig.show()
|
| 28 |
|
| 29 |
|
| 30 |
|
|
|
|
| 19 |
dictXYZV = my_stm.load_gaziev_from_hf(REPO_ID, lstTestFiles)
|
| 20 |
|
| 21 |
key_xyz = st.selectbox("Выберите файл данных для просмотра таблицы и точек", dictXYZV.keys())
|
| 22 |
+
if key_xyz:
|
| 23 |
+
df_xyz = dictXYZV[key_xyz]
|
| 24 |
|
| 25 |
+
col1.dataframe(df_xyz)
|
| 26 |
|
| 27 |
+
fig = my_stm.plotly_xyzv_scatter_gray(df_xyz)
|
| 28 |
+
col2.plotly_chart(fig) # st.plotly_chart(fig) #fig.show()
|
| 29 |
|
| 30 |
|
| 31 |
|