diff --git a/Project/simple_approach/Continous_Learner.ipynb b/Project/simple_approach/Continous_Learner.ipynb index 95f1bc2..01533e4 100644 --- a/Project/simple_approach/Continous_Learner.ipynb +++ b/Project/simple_approach/Continous_Learner.ipynb @@ -157,7 +157,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "233f744d595f4b81a362faef6b148fe7", + "model_id": "e508c9a1f8634b7ba790cf2f291e215a", "version_major": 2, "version_minor": 0 }, @@ -263,7 +263,8 @@ " [\n", " [\n", " (widgets.Text(),\"test_input\"),\n", - " (widgets.HTML(),\"prediction\")\n", + " (widgets.HTML(),\"prediction\"),\n", + " (widgets.Text(value=\"😳😋😀😌😏😔😒😎😢😅😁😉🙌🙏😘😊😩😍😭😂\"),\"prediction_ground_set\")\n", " ],\n", " [\n", " (widgets.Checkbox(),\"show_sorted_list\"),\n", @@ -760,9 +761,10 @@ " return\n", " X = shown_widgets[\"test_input\"].value\n", " pred = pm.predict([X])\n", - " shown_widgets[\"prediction\"].value = \"

\" + str(stl.sent2emoji(pred)[0]) + \"

\"\n", + " target_list=list(shown_widgets[\"prediction_ground_set\"].value)\n", + " shown_widgets[\"prediction\"].value = \"

\" + str(stl.sent2emoji(pred,custom_target_emojis=target_list)[0]) + \"

\"\n", " if shown_widgets[\"show_sorted_list\"].value:\n", - " mp(\"## \" + \"\".join(stl.edist.sentiment_vector_to_emoji(pred, only_emoticons=True, n_results=100)))\n", + " mp(\"## \" + \"\".join(stl.edist.sentiment_vector_to_emoji(pred, only_emoticons=True, n_results=100, custom_target_emojis=target_list)))\n", " \n", "\n", "\n",