eskayML's picture
Update app.py
29714b5
raw
history blame contribute delete
389 Bytes
import pickle
import gradio as gr
with open('stress_1.0.pkl','rb') as f:
model = pickle.load(f)
#print(model.steps)
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()