Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import gradio as gr
|
|
7 |
openai.api_key = os.environ.get('O_APIKey')
|
8 |
Data_Read = os.environ.get('Data_Reader')
|
9 |
ChurnData = os.environ.get('Churn_Data')
|
|
|
10 |
|
11 |
#read data
|
12 |
from llama_index import VectorStoreIndex, SimpleDirectoryReader, SummaryIndex, download_loader
|
@@ -19,7 +20,7 @@ loader = DataReader()
|
|
19 |
# or
|
20 |
# documents = loader.load_data(file=['toolkit.pdf','pdf2','pdf3'])
|
21 |
|
22 |
-
documents = loader.load_data(file=ChurnData)
|
23 |
index = VectorStoreIndex.from_documents(documents)
|
24 |
query_engine = index.as_query_engine()
|
25 |
|
@@ -28,4 +29,4 @@ def reply(message, history):
|
|
28 |
return answer
|
29 |
|
30 |
Conversing = gr.ChatInterface(reply, chatbot=gr.Chatbot(height=500), retry_btn=None,theme=gr.themes.Monochrome(),
|
31 |
-
title = '
|
|
|
7 |
openai.api_key = os.environ.get('O_APIKey')
|
8 |
Data_Read = os.environ.get('Data_Reader')
|
9 |
ChurnData = os.environ.get('Churn_Data')
|
10 |
+
ChurnData2 = os.environ.get('Churn_Data2')
|
11 |
|
12 |
#read data
|
13 |
from llama_index import VectorStoreIndex, SimpleDirectoryReader, SummaryIndex, download_loader
|
|
|
20 |
# or
|
21 |
# documents = loader.load_data(file=['toolkit.pdf','pdf2','pdf3'])
|
22 |
|
23 |
+
documents = loader.load_data(file=[ChurnData,Churndata2])
|
24 |
index = VectorStoreIndex.from_documents(documents)
|
25 |
query_engine = index.as_query_engine()
|
26 |
|
|
|
29 |
return answer
|
30 |
|
31 |
Conversing = gr.ChatInterface(reply, chatbot=gr.Chatbot(height=500), retry_btn=None,theme=gr.themes.Monochrome(),
|
32 |
+
title = 'ECommerce And Digital Marketing 2024 Toolkit Q&A', undo_btn = None, clear_btn = None, css='footer {visibility: hidden}').launch()
|