Hackavist commited on
Commit
96255f8
1 Parent(s): 4190c41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -3,8 +3,7 @@ from transformers import DistilBertTokenizerFast, DistilBertForQuestionAnswering
3
 
4
  model_name = "distilbert-base-cased"
5
  tokenizer = DistilBertTokenizerFast.from_pretrained(model_name)
6
- # Set output_attentions and output_hidden_states to False to prevent weight initialization warnings
7
- model = DistilBertForQuestionAnswering.from_pretrained(model_name, output_attentions=False, output_hidden_states=False)
8
 
9
  def format_response(start_index, end_index, raw_answer):
10
  answer_tokens = tokenizer.convert_tokens_to_string([tokenizer.convert_ids_to_tokens(i)[0] for i in range(start_index, end_index+1)])
 
3
 
4
  model_name = "distilbert-base-cased"
5
  tokenizer = DistilBertTokenizerFast.from_pretrained(model_name)
6
+ model = DistilBertForQuestionAnswering.from_pretrained(model_name)
 
7
 
8
  def format_response(start_index, end_index, raw_answer):
9
  answer_tokens = tokenizer.convert_tokens_to_string([tokenizer.convert_ids_to_tokens(i)[0] for i in range(start_index, end_index+1)])