Skip to content

Commit

Permalink
Updated due to breaking change in Gradio v5
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-donner committed Nov 15, 2024
1 parent 3189509 commit 7aeb18a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions week8/day5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
"metadata": {},
"outputs": [],
"source": [
"# Updated to change from height to max_height due to change in Gradio v5\n",
"# With much thanks to student Ed B. for raising this\n",
"\n",
"with gr.Blocks(title=\"The Price is Right\", fill_width=True) as ui:\n",
"\n",
" initial_deal = Deal(product_description=\"Example description\", price=100.0, url=\"https://cnn.com\")\n",
Expand All @@ -69,7 +72,7 @@
" column_widths=[4, 1, 1, 1, 2],\n",
" row_count=10,\n",
" col_count=5,\n",
" height=400,\n",
" max_height=400,\n",
" )\n",
"\n",
" ui.load(get_table, inputs=[opportunities], outputs=[opportunities_dataframe])\n",
Expand Down Expand Up @@ -111,7 +114,7 @@
" column_widths=[4, 1, 1, 1, 2],\n",
" row_count=10,\n",
" col_count=5,\n",
" height=400,\n",
" max_height=400,\n",
" )\n",
"\n",
" ui.load(get_table, inputs=[opportunities], outputs=[opportunities_dataframe])\n",
Expand Down
2 changes: 1 addition & 1 deletion week8/price_is_right.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def do_select(selected_index: gr.SelectData):
column_widths=[4, 1, 1, 1, 2],
row_count=10,
col_count=5,
height=400,
max_height=400,
)

ui.load(start, inputs=[], outputs=[opportunities_dataframe])
Expand Down

0 comments on commit 7aeb18a

Please sign in to comment.