raethehacker commited on
Commit
82d2d9a
·
verified ·
1 Parent(s): 1467a1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -16,7 +16,8 @@ async def classify_emotion(message: str):
16
  emotions = api.Emotions()
17
  try:
18
  results = emotions.emotion(model_slug='Emotion-1.0', message=message)
19
- return results
 
20
  except Exception as e:
21
  return {"error": str(e)}
22
 
 
16
  emotions = api.Emotions()
17
  try:
18
  results = emotions.emotion(model_slug='Emotion-1.0', message=message)
19
+ json_results = json.dumps(results, indent=4)
20
+ return json_results
21
  except Exception as e:
22
  return {"error": str(e)}
23