Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def answer_question_from_pdf(pdf_text, question):
|
|
77 |
# This function should return the answer to the question based on the PDF content
|
78 |
# Here we just return a mock response
|
79 |
|
80 |
-
answer = query( {"inputs": "Based on this content: " + pdf_text+" The Question is: "+ question + " Provide the answer with max lenghth of about
|
81 |
answer = answer[0]["generated_text"]
|
82 |
answer = answer[answer.find("Answer")+6:]
|
83 |
return answer
|
|
|
77 |
# This function should return the answer to the question based on the PDF content
|
78 |
# Here we just return a mock response
|
79 |
|
80 |
+
answer = query( {"inputs": "Based on this content: " + pdf_text+" The Question is: "+ question + " Provide the answer with max lenghth of about 1500",})
|
81 |
answer = answer[0]["generated_text"]
|
82 |
answer = answer[answer.find("Answer")+6:]
|
83 |
return answer
|