File size: 290 Bytes
be81367 |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |