alinikkhah commited on
Commit
d289606
·
verified ·
1 Parent(s): a2e351e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import torch
2
  from transformers import BertForSequenceClassification
3
 
4
  # Load your BERT model
5
- model = BertForSequenceClassification.from_pretrained('bert-base-uncased')
6
  model.load_state_dict(torch.load('bert_model_complete.pth', map_location=torch.device('cpu')))
7
  model.eval() # Set the model to evaluation mode
8
  import gradio as gr
 
2
  from transformers import BertForSequenceClassification
3
 
4
  # Load your BERT model
5
+ model = BertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=2)
6
  model.load_state_dict(torch.load('bert_model_complete.pth', map_location=torch.device('cpu')))
7
  model.eval() # Set the model to evaluation mode
8
  import gradio as gr