import gradio as gr | |
from transformers import pipeline | |
classifier = pipeline("text-classification", model="juliensimon/distilbert-amazon-shoe-reviews") | |
def predict(review): | |
return classifier(review) | |
iface = gr.Interface(fn=predict, inputs="text", outputs="text") | |
iface.launch() |