Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import openai
|
2 |
-
from llama_index import SimpleDirectoryReader, VectorStoreIndex
|
3 |
from cnocr import CnOcr
|
4 |
import gradio as gr
|
5 |
|
@@ -61,7 +61,7 @@ def get_response(openai_apikey, msg, bot, query_engine):
|
|
61 |
|
62 |
def up_file(files):
|
63 |
Doc_text_list = []
|
64 |
-
for file in enumerate(files):
|
65 |
print(file.name)
|
66 |
return gr.Textbox.update(visible = True), gr.Button.update(visible = True), gr.Markdown.update(value = '点击“建立索引”开始对话',)
|
67 |
|
|
|
1 |
import openai
|
2 |
+
from llama_index import SimpleDirectoryReader, VectorStoreIndex, Prompt
|
3 |
from cnocr import CnOcr
|
4 |
import gradio as gr
|
5 |
|
|
|
61 |
|
62 |
def up_file(files):
|
63 |
Doc_text_list = []
|
64 |
+
for idx, file in enumerate(files):
|
65 |
print(file.name)
|
66 |
return gr.Textbox.update(visible = True), gr.Button.update(visible = True), gr.Markdown.update(value = '点击“建立索引”开始对话',)
|
67 |
|