eskayML's picture
Create app.py
73a73f3
raw
history blame
349 Bytes
import pickle
import gradio as gr
model = pickle.load(open('stress_1.0.pkl', 'rb'))
def predict_stress(text):
return model.predict([text])[0].upper()
demo = gr.Interface(
fn = predict_stress,
inputs=gr.Textbox(lines=2, placeholder="Enter Text Here...", label = 'Predicting Stress through text'),
outputs = 'text',
)
demo.launch()