mrm8488's picture
Initial commit
47c1e73
raw
history blame
No virus
310 Bytes
import gradio as gr
from transformers import pipeline
model = 'mrm8488/electricidad-small-finetuned-amazon-review-classification'
def classify(text):
cls= pipeline("text-classification", model=model)
return cls(text)[0]['label']
gr.Interface(fn=classify, inputs=["textbox"], outputs="text").launch()