Upload app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ import streamlit_authenticator as stauth
|
|
41 |
import database as db # python文件同目录下的.py程序,直接导入。
|
42 |
import deta
|
43 |
from langchain.chat_models import ChatOpenAI
|
44 |
-
from
|
45 |
from llama_index import ServiceContext, QuestionAnswerPrompt
|
46 |
import sys
|
47 |
import time
|
@@ -436,7 +436,7 @@ async def data_mode():
|
|
436 |
### authentication with a local yaml file.
|
437 |
import yaml
|
438 |
from yaml.loader import SafeLoader
|
439 |
-
with open('
|
440 |
config = yaml.load(file, Loader=SafeLoader)
|
441 |
authenticator = stauth.Authenticate(
|
442 |
config['credentials'],
|
|
|
41 |
import database as db # python文件同目录下的.py程序,直接导入。
|
42 |
import deta
|
43 |
from langchain.chat_models import ChatOpenAI
|
44 |
+
from langchain import StorageContext, load_index_from_storage, GPTVectorStoreIndex, LLMPredictor, PromptHelper
|
45 |
from llama_index import ServiceContext, QuestionAnswerPrompt
|
46 |
import sys
|
47 |
import time
|
|
|
436 |
### authentication with a local yaml file.
|
437 |
import yaml
|
438 |
from yaml.loader import SafeLoader
|
439 |
+
with open('./config.yaml') as file:
|
440 |
config = yaml.load(file, Loader=SafeLoader)
|
441 |
authenticator = stauth.Authenticate(
|
442 |
config['credentials'],
|