import gradio as gr | |
from transformers import pipeline | |
classifier = pipeline("sentiment-analysis") | |
def summarize(input): | |
output = get_completion(input) | |
return output[0]['sentiment'] | |
gr.close_all() | |
demo = gr.Interface(fn=classifier, inputs="text", outputs="text") | |
demo.launch() |