Update app.py
Browse files
app.py
CHANGED
@@ -49,6 +49,7 @@ import PyPDF2 ## read the local_KB PDF file.
|
|
49 |
# import localKB_construct
|
50 |
import save_database_info
|
51 |
from datetime import datetime
|
|
|
52 |
|
53 |
os.environ["OPENAI_API_KEY"] = os.environ['user_token']
|
54 |
openai.api_key = os.environ['user_token']
|
@@ -618,7 +619,7 @@ def upload_file(uploaded_file):
|
|
618 |
# st.write(upload_file)
|
619 |
localKB_construct.process_file(uploaded_file, username)
|
620 |
## 在屏幕上展示当前知识库的信息,包括名字和加载日期。
|
621 |
-
save_database_info.save_database_info(f'./{username}/database_name.csv', filename, str(datetime.now().strftime("%Y-%m-%d %H:%M")))
|
622 |
st.markdown('新知识库解析成功,请务必刷新页面,然后开启对话 🔃')
|
623 |
# spinner = st.empty()
|
624 |
|
|
|
49 |
# import localKB_construct
|
50 |
import save_database_info
|
51 |
from datetime import datetime
|
52 |
+
import pytz
|
53 |
|
54 |
os.environ["OPENAI_API_KEY"] = os.environ['user_token']
|
55 |
openai.api_key = os.environ['user_token']
|
|
|
619 |
# st.write(upload_file)
|
620 |
localKB_construct.process_file(uploaded_file, username)
|
621 |
## 在屏幕上展示当前知识库的信息,包括名字和加载日期。
|
622 |
+
save_database_info.save_database_info(f'./{username}/database_name.csv', filename, str(datetime.now(pytz.timezone('Asia/Shanghai')).strftime("%Y-%m-%d %H:%M")))
|
623 |
st.markdown('新知识库解析成功,请务必刷新页面,然后开启对话 🔃')
|
624 |
# spinner = st.empty()
|
625 |
|