Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
from transformers import
|
| 2 |
import gradio as grad
|
| 3 |
-
|
| 4 |
-
|
| 5 |
|
| 6 |
def classify(text,label):
|
| 7 |
tkn_ids = bart_tkn.encode(text, label, return_tensors='pt')
|
|
|
|
| 1 |
+
from transformers import BartForSequenceClassification, BartTokenizer
|
| 2 |
import gradio as grad
|
| 3 |
+
bart_tkn = BartTokenizer.from_pretrained('oigele/Fb_improved_zeroshot')
|
| 4 |
+
mdl = BartForSequenceClassification.from_pretrained('oigele/Fb_improved_zeroshot')
|
| 5 |
|
| 6 |
def classify(text,label):
|
| 7 |
tkn_ids = bart_tkn.encode(text, label, return_tensors='pt')
|