sundea commited on
Commit
23cd87c
1 Parent(s): 06499cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,10 +3,10 @@ import os
3
  import gradio as gr
4
  import torch
5
  from transformers.models.bert import BertTokenizer, BertForSequenceClassification
6
- path='./roberta-base-cold'
7
  vocab='vocab.txt'
8
- tokenizer = BertTokenizer.from_pretrained(os.path.join(path,vocab))
9
- model = BertForSequenceClassification.from_pretrained('roberta-base-cold')
10
  model.eval()
11
 
12
 
 
3
  import gradio as gr
4
  import torch
5
  from transformers.models.bert import BertTokenizer, BertForSequenceClassification
6
+ path='pytorch_model.bin'
7
  vocab='vocab.txt'
8
+ tokenizer = BertTokenizer.from_pretrained(vocab)
9
+ model = BertForSequenceClassification.from_pretrained(path)
10
  model.eval()
11
 
12