| import sklearn | |
| import gradio as gr | |
| import joblib | |
| model = joblib.load("./pipeline.pkl") | |
| inputs = [gr.Textbox(value = "I love this!")] | |
| outputs = [gr.Label(label = "Sentiment")] | |
| title = "Sentiment Analysis Classifier" | |
| description = "This is a sentiment classifier using longformer model with a logistic regression head. " | |
| gr.Interface(infer, inputs = inputs, outputs = outputs, title = title, description = description).launch() | 

