Spaces:
Runtime error
Runtime error
added sentiment-model
Browse files- .gitattributes +1 -0
- app.py +15 -0
- model.pkl +3 -0
- requirements.txt +2 -0
.gitattributes
CHANGED
@@ -25,3 +25,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
model.pkl filter=lfs diff=lfs merge=lfs -text
|
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import joblib
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
|
5 |
+
model = joblib.load("model.pkl")
|
6 |
+
|
7 |
+
|
8 |
+
def get_sentiment(input_text):
|
9 |
+
return model.predict([input_text])
|
10 |
+
|
11 |
+
|
12 |
+
iface = gr.Interface(
|
13 |
+
fn=get_sentiment, inputs="text", outputs=["text"], title="Sentiment Analysis"
|
14 |
+
)
|
15 |
+
iface.launch(inline=False)
|
model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a89f0d42ba9e874a82adec287c7fe26934478698a3f464e653e02340598f1ad
|
3 |
+
size 456450
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
joblib
|
2 |
+
sklearn
|