eskayML commited on
Commit
73a73f3
·
1 Parent(s): 14b0947

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pickle
2
+ import gradio as gr
3
+
4
+
5
+ model = pickle.load(open('stress_1.0.pkl', 'rb'))
6
+
7
+ def predict_stress(text):
8
+ return model.predict([text])[0].upper()
9
+
10
+
11
+ demo = gr.Interface(
12
+ fn = predict_stress,
13
+ inputs=gr.Textbox(lines=2, placeholder="Enter Text Here...", label = 'Predicting Stress through text'),
14
+ outputs = 'text',
15
+ )
16
+
17
+ demo.launch()