Simplify output
Browse files
app.py
CHANGED
@@ -63,6 +63,12 @@ def rasa_predict(input):
|
|
63 |
if "start" in e and "end" in e:
|
64 |
del e["start"]
|
65 |
del e["end"]
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
return pformat(response, indent=4)
|
68 |
|
|
|
63 |
if "start" in e and "end" in e:
|
64 |
del e["start"]
|
65 |
del e["end"]
|
66 |
+
if "confidence_entity" in e:
|
67 |
+
del e["confidence_entity"]
|
68 |
+
if "intent_ranking" in response:
|
69 |
+
del response["intent_ranking"]
|
70 |
+
if "intent" in response:
|
71 |
+
response["intent"] = response["intent"]["name"]
|
72 |
|
73 |
return pformat(response, indent=4)
|
74 |
|