tarrasyed19472007 commited on
Commit
34b1221
·
verified ·
1 Parent(s): d5c70d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,6 +9,7 @@ from datasets import load_dataset
9
  def load_model():
10
  try:
11
  st.write("Loading the emotion analysis model...")
 
12
  emotion_analyzer = pipeline("text-classification", model="suryakiran786/T5-emotion")
13
  st.write("Model loaded successfully!")
14
  return emotion_analyzer
@@ -19,7 +20,7 @@ def load_model():
19
  # Initialize the model (with caching to prevent reloads)
20
  emotion_analyzer = load_model()
21
 
22
- # Load the dataset if needed for any additional logic
23
  @st.cache_data
24
  def load_data():
25
  try:
 
9
  def load_model():
10
  try:
11
  st.write("Loading the emotion analysis model...")
12
+ # Initialize the emotion classifier using the T5 model fine-tuned for emotion classification
13
  emotion_analyzer = pipeline("text-classification", model="suryakiran786/T5-emotion")
14
  st.write("Model loaded successfully!")
15
  return emotion_analyzer
 
20
  # Initialize the model (with caching to prevent reloads)
21
  emotion_analyzer = load_model()
22
 
23
+ # Load the dataset if needed for any additional logic (not used in emotion analysis directly, just for example)
24
  @st.cache_data
25
  def load_data():
26
  try: