CountingMstar Seungah Son commited on
Commit
c592be6
1 Parent(s): 2914830

Update app.py (#2)

Browse files

- Update app.py (5ab40f9df4716eeac234c343e89ab40c07f359f0)


Co-authored-by: Seungah Son <[email protected]>

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,9 +3,11 @@ from transformers import BertForQuestionAnswering
3
  from transformers import BertTokenizerFast
4
  import torch
5
  from nltk.tokenize import word_tokenize
 
6
 
7
  tokenizer = BertTokenizerFast.from_pretrained('bert-base-uncased')
8
- model = BertForQuestionAnswering.from_pretrained("bert-base-uncased")
 
9
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
10
 
11
  def get_prediction(context, question):
 
3
  from transformers import BertTokenizerFast
4
  import torch
5
  from nltk.tokenize import word_tokenize
6
+ import timm
7
 
8
  tokenizer = BertTokenizerFast.from_pretrained('bert-base-uncased')
9
+ model = timm.create_model('hf_hub:pseudolab/AI_Tutor_BERT', pretrained=True)
10
+ #model = BertForQuestionAnswering.from_pretrained("bert-base-uncased")
11
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
12
 
13
  def get_prediction(context, question):