Spaces:
Runtime error
Runtime error
modified mood mappings again
Browse files
main.py
CHANGED
|
@@ -27,13 +27,13 @@ LASTFM_API_KEY = os.getenv("LASTFM_API_KEY")
|
|
| 27 |
class TextInput(BaseModel):
|
| 28 |
text: str
|
| 29 |
|
| 30 |
-
|
| 31 |
-
"happy": "happy",
|
| 32 |
-
"sad": "sad",
|
| 33 |
-
"angry": "metal",
|
| 34 |
-
"anxious": "
|
| 35 |
-
"calm": "ambient",
|
| 36 |
-
"romantic": "romance",
|
| 37 |
}
|
| 38 |
|
| 39 |
@app.post("/detect-mood")
|
|
|
|
| 27 |
class TextInput(BaseModel):
|
| 28 |
text: str
|
| 29 |
|
| 30 |
+
mood_to_tags = {
|
| 31 |
+
"happy": ["happy", "feel good"],
|
| 32 |
+
"sad": ["sad", "melancholy"],
|
| 33 |
+
"angry": ["metal", "rock"],
|
| 34 |
+
"anxious": ["chill", "ambient"],
|
| 35 |
+
"calm": ["ambient", "acoustic"],
|
| 36 |
+
"romantic": ["romance", "love"],
|
| 37 |
}
|
| 38 |
|
| 39 |
@app.post("/detect-mood")
|