mavinsao's picture
Update app.py
c4020ea verified
raw
history blame
475 Bytes
# Use a pipeline as a high-level helper
from transformers import pipeline
import streamlit as st
pipe = pipeline("text-classification", model="mavinsao/mi-roberta-base-finetuned-mental-illness")
# Streamlit app
st.title('Mental Illness Prediction')
# Input text area for user input
sentence = st.text_area("Enter the long sentence to predict your mental illness state:")
# Prediction button
if st.button('Predict'):
st.write("Predicted labels:", pipe(sentence))