Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sklearn
|
2 |
+
import gradio as gr
|
3 |
+
import joblib
|
4 |
+
|
5 |
+
model = joblib.load("./pipeline.pkl")
|
6 |
+
inputs = [gr.Textbox(value = "I love this!")]
|
7 |
+
outputs = [gr.Label(label = "Sentiment")]
|
8 |
+
title = "Sentiment Analysis Classifier"
|
9 |
+
description = "This is a sentiment classifier using longformer model with a logistic regression head. "
|
10 |
+
gr.Interface(infer, inputs = inputs, outputs = outputs, title = title, description = description).launch()
|