Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
-
from transformers import AutoTokenizer
|
| 4 |
|
| 5 |
# Load the fine-tuned model from Hugging Face Hub
|
| 6 |
classifier = pipeline("text-classification", model="Emanai/my-finetuned-bert2")
|
| 7 |
-
tokenizer = AutoTokenizer.from_pretrained('Emanai/my-finetuned-bert2')
|
| 8 |
|
| 9 |
def classify_text(text):
|
| 10 |
return classifier(text)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
|
|
|
| 3 |
|
| 4 |
# Load the fine-tuned model from Hugging Face Hub
|
| 5 |
classifier = pipeline("text-classification", model="Emanai/my-finetuned-bert2")
|
|
|
|
| 6 |
|
| 7 |
def classify_text(text):
|
| 8 |
return classifier(text)
|