merve HF staff commited on
Commit
f62a90d
·
1 Parent(s): 0041db4

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
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()