Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -108,10 +108,15 @@ def answer_predefined_questions(document_type):
|
|
108 |
while i < len(queryList):
|
109 |
question = queryList[i]
|
110 |
field = fieldList[i]
|
|
|
|
|
|
|
|
|
|
|
111 |
answer = pdf_qa.run(question)
|
112 |
-
|
113 |
-
response +=
|
114 |
-
|
115 |
return response
|
116 |
|
117 |
|
|
|
108 |
while i < len(queryList):
|
109 |
question = queryList[i]
|
110 |
field = fieldList[i]
|
111 |
+
|
112 |
+
fieldInfo = "Field Name:", field
|
113 |
+
response += fieldInfo
|
114 |
+
questionInfo = "; Question sent to gpt-4: ", question
|
115 |
+
response += questionInfo
|
116 |
answer = pdf_qa.run(question)
|
117 |
+
gptResponse = "; Response from gpt-4:", answer
|
118 |
+
response += gptResponse
|
119 |
+
|
120 |
return response
|
121 |
|
122 |
|