Spaces:
Sleeping
Sleeping
use cpu
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
classifier = pipeline(task='text-classification', model='cwchang/my-text-classification-finetuned-v1', device
|
5 |
|
6 |
def classify(text):
|
7 |
return classifier(text)[0]["label"]
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
classifier = pipeline(task='text-classification', model='cwchang/my-text-classification-finetuned-v1', device=-1)
|
5 |
|
6 |
def classify(text):
|
7 |
return classifier(text)[0]["label"]
|