File size: 437 Bytes
291793f
 
a681e0a
291793f
a681e0a
 
 
 
 
ff694a9
a681e0a
 
 
291793f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="mavinsao/mi-roberta-classification")

# 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))