Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,10 @@ from langchain.cache import InMemoryCache
|
|
11 |
import langchain
|
12 |
import time
|
13 |
import os
|
|
|
14 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
|
|
|
|
15 |
|
16 |
import pinecone
|
17 |
# 初始化 pinecone
|
@@ -48,4 +51,4 @@ langchain.llm_cache = InMemoryCache()
|
|
48 |
gr.ChatInterface(predict, theme=gr.themes.Default(),
|
49 |
textbox=gr.Textbox(placeholder="请输入您的问题...", container=False, scale=7),
|
50 |
title="欢迎使用智造云AI助手",
|
51 |
-
examples=["老师反馈文件传输慢怎么处理?", "用户作业同步状态速度为0应该联系谁?"]).queue().launch(debug=True)
|
|
|
11 |
import langchain
|
12 |
import time
|
13 |
import os
|
14 |
+
|
15 |
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
16 |
+
USER=os.getenv('USER')
|
17 |
+
PASS=os.getenv('PASS')
|
18 |
|
19 |
import pinecone
|
20 |
# 初始化 pinecone
|
|
|
51 |
gr.ChatInterface(predict, theme=gr.themes.Default(),
|
52 |
textbox=gr.Textbox(placeholder="请输入您的问题...", container=False, scale=7),
|
53 |
title="欢迎使用智造云AI助手",
|
54 |
+
examples=["老师反馈文件传输慢怎么处理?", "用户作业同步状态速度为0应该联系谁?"]).queue().launch(debug=True,auth=(USER, PASS))
|