f64 commited on
Commit
b34e7e7
·
1 Parent(s): c2e1c7f
Files changed (2) hide show
  1. pages/6_Chat.py +6 -3
  2. requirements.txt +1 -2
pages/6_Chat.py CHANGED
@@ -2,25 +2,28 @@ import os, re, sys, time, math, shutil, urllib, string, random, pickle, zipfile,
2
  import streamlit as st, pandas as pd, numpy as np
3
  import my_static_methods as my_stm
4
  from faker import Faker
5
- from streamlit_gsheets import GSheetsConnection
6
 
7
  st.html(my_stm.STYLE_CORRECTION)
8
  st.sidebar.markdown("# Переговоры 💬")
9
 
10
  # Create a connection object.
11
- conn = st.connection("gsheets", type=GSheetsConnection)
12
- st.write(conn)
13
  #st.help(conn)
 
14
  REPO = my_stm.HfRepo("f64k/gaziev", "dataset", st.secrets["HF_WRITE"])
15
  lstRepoFiles = my_stm.list_files_hf(REPO) # список уже имеющихся в репозитории файлов
16
  dictTestFilesIdXyz = {f.upper().replace("ID_XYZ/",""): f.upper() for f in lstRepoFiles if f.upper().startswith("ID_XYZ/")}
17
 
 
18
  if st.button("Update worksheet"):
19
  dict_ONE_IDXYZ = my_stm.load_dataframes_from_hf(REPO, ["ID_XYZ/IDXYZ_5X7_BBB011116_DDD011112.CSV"])
20
  if len(dict_ONE_IDXYZ) > 0:
21
  df_idxyz = list(dict_ONE_IDXYZ.values())[0]
22
  dfUpdSheet = conn.update(worksheet="sh2", data=df_idxyz)
23
  st.write(dfUpdSheet)
 
24
 
25
  fake = Faker()
26
  fakeRU = Faker("ru_RU")
 
2
  import streamlit as st, pandas as pd, numpy as np
3
  import my_static_methods as my_stm
4
  from faker import Faker
5
+ #from streamlit_gsheets import GSheetsConnection # st-gsheets-connection - конфликт с pandas 2.2.2
6
 
7
  st.html(my_stm.STYLE_CORRECTION)
8
  st.sidebar.markdown("# Переговоры 💬")
9
 
10
  # Create a connection object.
11
+ #conn = st.connection("gsheets", type=GSheetsConnection)
12
+ #st.write(conn)
13
  #st.help(conn)
14
+
15
  REPO = my_stm.HfRepo("f64k/gaziev", "dataset", st.secrets["HF_WRITE"])
16
  lstRepoFiles = my_stm.list_files_hf(REPO) # список уже имеющихся в репозитории файлов
17
  dictTestFilesIdXyz = {f.upper().replace("ID_XYZ/",""): f.upper() for f in lstRepoFiles if f.upper().startswith("ID_XYZ/")}
18
 
19
+ """
20
  if st.button("Update worksheet"):
21
  dict_ONE_IDXYZ = my_stm.load_dataframes_from_hf(REPO, ["ID_XYZ/IDXYZ_5X7_BBB011116_DDD011112.CSV"])
22
  if len(dict_ONE_IDXYZ) > 0:
23
  df_idxyz = list(dict_ONE_IDXYZ.values())[0]
24
  dfUpdSheet = conn.update(worksheet="sh2", data=df_idxyz)
25
  st.write(dfUpdSheet)
26
+ """
27
 
28
  fake = Faker()
29
  fakeRU = Faker("ru_RU")
requirements.txt CHANGED
@@ -1,9 +1,8 @@
1
  streamlit
2
- st-gsheets-connection
3
  huggingface_hub
4
  scikit-learn
5
  plotly
6
- pandas==2.2.2
7
  numpy
8
  faker
9
  psutil
 
1
  streamlit
 
2
  huggingface_hub
3
  scikit-learn
4
  plotly
5
+ pandas
6
  numpy
7
  faker
8
  psutil