dappyx commited on
Commit
7331e67
·
verified ·
1 Parent(s): 975d96a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,8 +2,8 @@ from transformers import DistilBertForQuestionAnswering, DistilBertConfig, Disti
2
  import torch
3
 
4
  model = DistilBertForQuestionAnswering(DistilBertConfig.from_pretrained('distilbert/distilbert-base-multilingual-cased')).to("cpu")
5
- st_dict = torch.load("QazDistilBERT.pt")
6
- model.load_state_dict(st_dict,map_location=torch.device('cpu'))
7
  tokenizer = DistilBertTokenizerFast.from_pretrained("dappyx/QazDistilbertFast-tokenizerV3")
8
 
9
  import gradio as gr
 
2
  import torch
3
 
4
  model = DistilBertForQuestionAnswering(DistilBertConfig.from_pretrained('distilbert/distilbert-base-multilingual-cased')).to("cpu")
5
+ st_dict = torch.load("QazDistilBERT.pt",map_location=torch.device('cpu'))
6
+ model.load_state_dict(st_dict)
7
  tokenizer = DistilBertTokenizerFast.from_pretrained("dappyx/QazDistilbertFast-tokenizerV3")
8
 
9
  import gradio as gr