Update app.py
Browse files
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='.
|
| 7 |
vocab='vocab.txt'
|
| 8 |
-
tokenizer = BertTokenizer.from_pretrained(
|
| 9 |
-
model = BertForSequenceClassification.from_pretrained(
|
| 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 |
|