tarrasyed19472007 commited on
Commit
22b9487
·
verified ·
1 Parent(s): 7b6f550

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,10 +19,10 @@ def extract_text_from_pdf(pdf_file):
19
  # Function to handle question answering
20
  def answer_question(question, pdf_text):
21
  # Prepare the context for the model
22
- inputs = tokenizer([question], return_tensors="pt")
23
 
24
  # Tokenize PDF text
25
- pdf_inputs = tokenizer([pdf_text], return_tensors="pt")
26
 
27
  # Generate the answer
28
  with torch.no_grad():
 
19
  # Function to handle question answering
20
  def answer_question(question, pdf_text):
21
  # Prepare the context for the model
22
+ inputs = tokenizer(question, return_tensors="pt")
23
 
24
  # Tokenize PDF text
25
+ pdf_inputs = tokenizer(pdf_text, return_tensors="pt")
26
 
27
  # Generate the answer
28
  with torch.no_grad():