From 7aeb18a3df1018f1a7dff3ed86a3ef5d1de3dff4 Mon Sep 17 00:00:00 2001 From: Edward Donner Date: Fri, 15 Nov 2024 06:56:00 +0000 Subject: [PATCH] Updated due to breaking change in Gradio v5 --- week8/day5.ipynb | 7 +++++-- week8/price_is_right.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/week8/day5.ipynb b/week8/day5.ipynb index e135d76..400a11e 100644 --- a/week8/day5.ipynb +++ b/week8/day5.ipynb @@ -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", @@ -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", @@ -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", diff --git a/week8/price_is_right.py b/week8/price_is_right.py index be63742..d6a1bc9 100644 --- a/week8/price_is_right.py +++ b/week8/price_is_right.py @@ -44,7 +44,7 @@ class App: 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])