Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
#
|
5 |
@st.cache_resource
|
6 |
def load_model():
|
7 |
try:
|
8 |
-
# Use Hugging Face's pipeline for text classification
|
9 |
emotion_classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base")
|
10 |
return emotion_classifier
|
11 |
except Exception as e:
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
# Attempt to load the model
|
5 |
@st.cache_resource
|
6 |
def load_model():
|
7 |
try:
|
|
|
8 |
emotion_classifier = pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base")
|
9 |
return emotion_classifier
|
10 |
except Exception as e:
|