Spaces:
Runtime error
Runtime error
File size: 349 Bytes
73a73f3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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() |