# here are some examples for sadness, joy, anger, and optimism. import gradio as gr examples = [ ["The movie was a bummer."], ["I cannot wait to watch all these movies!"], ["The ending of the movie really irks me, gives me the ick fr."], ["The protagonist seems to have a lot of hope...."] ] # The UI is being generated here. gradio_ui = gr.Interface( fn=predict, # inserting the model here. title="Sentiment Analysis", examples=examples, inputs=gr.inputs.Textbox(lines=5, label="Paste an Article here."), outputs=[gr.outputs.Textbox(label="Label"),gr.outputs.Textbox(label="Score"),], ) gradio_ui.launch(share=True, debug=False) # launching the model.