Spaces:
Sleeping
Sleeping
Added GET emotion function
Browse files- app/main.py +5 -0
app/main.py
CHANGED
|
@@ -24,4 +24,9 @@ async def detect_emotion(input_data: TextInput):
|
|
| 24 |
text1 = input_data.InputText
|
| 25 |
emotion= emotion_detection(text1)
|
| 26 |
response={"Text Entered":text1,"emotion":emotion}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
return response
|
|
|
|
| 24 |
text1 = input_data.InputText
|
| 25 |
emotion= emotion_detection(text1)
|
| 26 |
response={"Text Entered":text1,"emotion":emotion}
|
| 27 |
+
return response
|
| 28 |
+
@app.get("/testing/")
|
| 29 |
+
async def testing_emotion(input_data):
|
| 30 |
+
emotion= emotion_detection(input_data)
|
| 31 |
+
response={"Text Entered":input_data,"emotion":emotion}
|
| 32 |
return response
|