import gradio import nltk import pandas as pd from transformers import pipeline summarizer = pipeline('summarization', model='t5-base') # classifier_model_name = 'bhadresh-savani/distilbert-base-uncased-emotion' # classifier_emotions = ['anger', 'disgust', 'fear', 'joy', 'sadness', 'surprise'] classifier_model_name = 'ProsusAI/finbert' classifier_emotions = ['positive', 'neutral', 'negative'] classifier = pipeline('text-classification', model=classifier_model_name) def my_inference_function(name): return "Hello " + name + "!" gr_interface = gradio.Interface( fn = my_inference_function, inputs = "text", outputs = "text" ) gr_interface.launch()