mrm8488's picture
Update app.py
073ff5f
raw
history blame
332 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, return_all_scores=True)
gr.Interface(fn=classify, inputs=["textbox"], outputs="text").launch(debug=True)