mayankchugh-learning
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,6 @@ retriever = vectorstore_persisted.as_retriever(
|
|
45 |
|
46 |
|
47 |
# Prepare the logging functionality
|
48 |
-
|
49 |
log_file = Path("logs/") / f"data_{uuid.uuid4()}.json"
|
50 |
log_folder = log_file.parent
|
51 |
|
@@ -58,7 +57,6 @@ scheduler = CommitScheduler(
|
|
58 |
)
|
59 |
|
60 |
# Define the Q&A system message
|
61 |
-
|
62 |
qna_system_message = """
|
63 |
You are an AI assistant to help Finsights Grey Inc., an innovative financial technology firm, develop a Retrieval-Augmented Generation (RAG) system to automate the extraction, summarization, and analysis of information from 10-K reports. Your knowledge base was last updated in August 2023.
|
64 |
|
@@ -142,7 +140,6 @@ def predict(user_input,company):
|
|
142 |
# Set-up the Gradio UI
|
143 |
# Add text box and radio button to the interface
|
144 |
# The radio button is used to select the company 10k report in which the context needs to be retrieved.
|
145 |
-
|
146 |
with gr.Blocks() as demo:
|
147 |
with gr.Row():
|
148 |
question = gr.Textbox(label="Enter your question")
|
@@ -159,8 +156,7 @@ with gr.Blocks() as demo:
|
|
159 |
|
160 |
demo.launch()
|
161 |
# Create the interface
|
162 |
-
# For the inputs parameter of Interface provide [textbox,company]
|
163 |
-
|
164 |
|
165 |
demo.queue()
|
166 |
demo.launch(auth=("demouser", os.getenv('PASSWD')))
|
|
|
45 |
|
46 |
|
47 |
# Prepare the logging functionality
|
|
|
48 |
log_file = Path("logs/") / f"data_{uuid.uuid4()}.json"
|
49 |
log_folder = log_file.parent
|
50 |
|
|
|
57 |
)
|
58 |
|
59 |
# Define the Q&A system message
|
|
|
60 |
qna_system_message = """
|
61 |
You are an AI assistant to help Finsights Grey Inc., an innovative financial technology firm, develop a Retrieval-Augmented Generation (RAG) system to automate the extraction, summarization, and analysis of information from 10-K reports. Your knowledge base was last updated in August 2023.
|
62 |
|
|
|
140 |
# Set-up the Gradio UI
|
141 |
# Add text box and radio button to the interface
|
142 |
# The radio button is used to select the company 10k report in which the context needs to be retrieved.
|
|
|
143 |
with gr.Blocks() as demo:
|
144 |
with gr.Row():
|
145 |
question = gr.Textbox(label="Enter your question")
|
|
|
156 |
|
157 |
demo.launch()
|
158 |
# Create the interface
|
159 |
+
# For the inputs parameter of Interface, provide [textbox, company]
|
|
|
160 |
|
161 |
demo.queue()
|
162 |
demo.launch(auth=("demouser", os.getenv('PASSWD')))
|