tarrasyed19472007 commited on
Commit
a5d4660
·
verified ·
1 Parent(s): a9fe7c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- # Load the emotion prediction model
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: