Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import time
|
|
|
4 |
|
5 |
|
6 |
from langchain.document_loaders import OnlinePDFLoader #for laoding the pdf
|
@@ -136,17 +137,17 @@ with gr.Blocks(css=css,theme=gr.themes.Monochrome()) as demo:
|
|
136 |
|
137 |
with gr.Row():
|
138 |
status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
139 |
-
load_pdf = gr.Button(
|
140 |
|
141 |
with gr.Row():
|
142 |
document_type = gr.Radio(['Deed of Trust', 'Transmittal Summary'], label="Select the Document Type")
|
143 |
answers = gr.Textbox(label="Answers to Predefined Question set")
|
144 |
-
answers_for_predefined_question_set = gr.Button(
|
145 |
|
146 |
with gr.Row():
|
147 |
input = gr.Textbox(label="Type in your question")
|
148 |
output = gr.Dataframe(label="Answer")
|
149 |
-
submit_query = gr.Button(
|
150 |
|
151 |
|
152 |
load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, openai_key], outputs=status)
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import time
|
4 |
+
import pandas as pd
|
5 |
|
6 |
|
7 |
from langchain.document_loaders import OnlinePDFLoader #for laoding the pdf
|
|
|
137 |
|
138 |
with gr.Row():
|
139 |
status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
140 |
+
load_pdf = gr.Button("Load PDF").style(full_width=False)
|
141 |
|
142 |
with gr.Row():
|
143 |
document_type = gr.Radio(['Deed of Trust', 'Transmittal Summary'], label="Select the Document Type")
|
144 |
answers = gr.Textbox(label="Answers to Predefined Question set")
|
145 |
+
answers_for_predefined_question_set = gr.Button("Get Answers to Pre-defined Question set").style(full_width=False)
|
146 |
|
147 |
with gr.Row():
|
148 |
input = gr.Textbox(label="Type in your question")
|
149 |
output = gr.Dataframe(label="Answer")
|
150 |
+
submit_query = gr.Button("Submit your own question").style(full_width=False)
|
151 |
|
152 |
|
153 |
load_pdf.click(load_pdf_and_generate_embeddings, inputs=[pdf_doc, openai_key], outputs=status)
|