Skip to content

Commit

Permalink
added table in output for gui part 4
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaMellouli committed Dec 19, 2021
1 parent 7e4b618 commit 87aacec
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions notebooks/milestone3_part4_gui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -115,7 +122,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0b4a08bab8494b08b8f53c78d62abd3f",
"model_id": "a1ab0e4dd63c43b2af881c21ee317173",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -152,9 +159,35 @@
" \n",
" #get results and print table\n",
" print(\"Game Id is :\",gameid)\n",
" \n",
" # fill from model\n",
" period = \"1\"\n",
" time_left = \"00:55\"\n",
" home_team = \"Canadians\"\n",
" away_team = \"Flames\"\n",
" xg_home = 2\n",
" xg_away = 1\n",
" \n",
" #draw table\n",
" table = [[f'PERIOD {period}' , f'TIME LEFT {time_left}'],\n",
" [\"HOME TEAM\", \"AWAY TEAM\"],\n",
" [home_team, away_team],\n",
" [xg_home, xg_away]\n",
" ]\n",
" print(' ')\n",
" print(tabulate(table, tablefmt='fancy_grid',headers=\"firstrow\", numalign=\"center\", stralign=\"center\"))\n",
" \n",
" \n",
" \n",
"game_button.on_click(on_game_button_clicked)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 87aacec

Please sign in to comment.