FuriouslyAsleep commited on
Commit
b0ae90b
1 Parent(s): 3ccf190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -84,7 +84,7 @@ def greet(htmlString,userQuestion):
84
  question = userQuestion
85
  single_html_string = htmlString
86
  #single_html_string = "<h1>Grid Fin</h1><table><tr><td><p>Cost Risk</p></td><td><p>None</p></td></tr><tr><td><p>Schedule Risk</p></td><td><p>None</p></td></tr></table><h1>Propulsion</h1><table><tr><td><p>Cost Risk</p></td><td><p>Yes, material overrun</p></td></tr><tr><td><p>Schedule Risk</p></td><td><p>None</p></td></tr></table><h1>Nose Cone</h1><table><tr><td><p>Cost Risk</p></td><td><p>Labor rate increases</p></td></tr><tr><td><p>Schedule Risk</p></td><td><p>None</p></td></tr></table>"
87
- inputs = tokenizer.encode_plus(question, single_html_string, return_tensors="pt", padding="max_length", max_length=10, truncation=True)
88
 
89
  answer_start_scores, answer_end_scores = model(**inputs, return_dict=False)
90
  answer_start = torch.argmax(answer_start_scores) # get the most likely beginning of answer with the argmax of the score
 
84
  question = userQuestion
85
  single_html_string = htmlString
86
  #single_html_string = "<h1>Grid Fin</h1><table><tr><td><p>Cost Risk</p></td><td><p>None</p></td></tr><tr><td><p>Schedule Risk</p></td><td><p>None</p></td></tr></table><h1>Propulsion</h1><table><tr><td><p>Cost Risk</p></td><td><p>Yes, material overrun</p></td></tr><tr><td><p>Schedule Risk</p></td><td><p>None</p></td></tr></table><h1>Nose Cone</h1><table><tr><td><p>Cost Risk</p></td><td><p>Labor rate increases</p></td></tr><tr><td><p>Schedule Risk</p></td><td><p>None</p></td></tr></table>"
87
+ inputs = tokenizer.encode_plus(question, single_html_string, return_tensors="pt", padding="max_length", max_length=512, truncation=True)
88
 
89
  answer_start_scores, answer_end_scores = model(**inputs, return_dict=False)
90
  answer_start = torch.argmax(answer_start_scores) # get the most likely beginning of answer with the argmax of the score