Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -82,7 +82,11 @@ def main(): | |
| 82 | 
             
                    detected_emotion = analysis_result[0]['label']
         | 
| 83 |  | 
| 84 | 
             
                    # Map detected emotion to a mood state
         | 
| 85 | 
            -
                    mood_mapping = { | 
|  | |
|  | |
|  | |
|  | |
| 86 | 
             
                    mood = mood_mapping.get(detected_emotion, "NEUTRAL")
         | 
| 87 |  | 
| 88 | 
             
                    st.write(f"Detected Mood: {mood}")
         | 
|  | |
| 82 | 
             
                    detected_emotion = analysis_result[0]['label']
         | 
| 83 |  | 
| 84 | 
             
                    # Map detected emotion to a mood state
         | 
| 85 | 
            +
                    mood_mapping = {
         | 
| 86 | 
            +
                        "LABEL_0": "NEGATIVE",  # for negative emotions
         | 
| 87 | 
            +
                        "LABEL_1": "POSITIVE",  # for positive emotions
         | 
| 88 | 
            +
                        "LABEL_2": "NEUTRAL",   # for neutral emotions
         | 
| 89 | 
            +
                    }
         | 
| 90 | 
             
                    mood = mood_mapping.get(detected_emotion, "NEUTRAL")
         | 
| 91 |  | 
| 92 | 
             
                    st.write(f"Detected Mood: {mood}")
         |