Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
import transformers
|
3 |
from transformers import pipeline
|
4 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
5 |
|
@@ -11,4 +10,4 @@ def classify(text):
|
|
11 |
cls= pipeline("text-classification",model=model, tokenizer=tokenizer)
|
12 |
return cls(text)[0]['label']
|
13 |
|
14 |
-
gr.Interface(fn=classify, inputs=["textbox"], outputs="
|
|
|
1 |
import gradio as gr
|
|
|
2 |
from transformers import pipeline
|
3 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
4 |
|
|
|
10 |
cls= pipeline("text-classification",model=model, tokenizer=tokenizer)
|
11 |
return cls(text)[0]['label']
|
12 |
|
13 |
+
gr.Interface(fn=classify, inputs=["textbox"], outputs="text").launch()
|