Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ def answer_predefined_questions(document_type):
|
|
80 |
i = 0
|
81 |
while i < len(queryList):
|
82 |
question = queryList[i]
|
83 |
-
responseList
|
84 |
i = i+1
|
85 |
|
86 |
return pd.DataFrame({"Field": [fieldList[0], fieldList[1], fieldList[2], fieldList[3], fieldList[4]], "Question to gpt-4": [queryList[0], queryList[1], queryList[2], queryList[3], queryList[4]], "Response from gpt-4": [responseList[0],responseList[1],responseList[2],responseList[3],responseList[4]]})
|
@@ -115,7 +115,7 @@ with gr.Blocks(css=css,theme=gr.themes.Monochrome()) as demo:
|
|
115 |
|
116 |
with gr.Row():
|
117 |
status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
118 |
-
load_pdf = gr.Button(label="Load PDF").style(full_width=False)
|
119 |
|
120 |
with gr.Row():
|
121 |
document_type = gr.Radio(['Deed of Trust', 'Transmittal Summary'], label="Select the Document Type")
|
|
|
80 |
i = 0
|
81 |
while i < len(queryList):
|
82 |
question = queryList[i]
|
83 |
+
responseList.append(pdf_qa.run(question))
|
84 |
i = i+1
|
85 |
|
86 |
return pd.DataFrame({"Field": [fieldList[0], fieldList[1], fieldList[2], fieldList[3], fieldList[4]], "Question to gpt-4": [queryList[0], queryList[1], queryList[2], queryList[3], queryList[4]], "Response from gpt-4": [responseList[0],responseList[1],responseList[2],responseList[3],responseList[4]]})
|
|
|
115 |
|
116 |
with gr.Row():
|
117 |
status = gr.Textbox(label="Status", placeholder="", interactive=False)
|
118 |
+
load_pdf = gr.Button(label="Load the PDF").style(full_width=False)
|
119 |
|
120 |
with gr.Row():
|
121 |
document_type = gr.Radio(['Deed of Trust', 'Transmittal Summary'], label="Select the Document Type")
|