Updated due to breaking change in Gradio v5
This commit is contained in:
@@ -49,6 +49,9 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"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",
|
"with gr.Blocks(title=\"The Price is Right\", fill_width=True) as ui:\n",
|
||||||
"\n",
|
"\n",
|
||||||
" initial_deal = Deal(product_description=\"Example description\", price=100.0, url=\"https://cnn.com\")\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",
|
" column_widths=[4, 1, 1, 1, 2],\n",
|
||||||
" row_count=10,\n",
|
" row_count=10,\n",
|
||||||
" col_count=5,\n",
|
" col_count=5,\n",
|
||||||
" height=400,\n",
|
" max_height=400,\n",
|
||||||
" )\n",
|
" )\n",
|
||||||
"\n",
|
"\n",
|
||||||
" ui.load(get_table, inputs=[opportunities], outputs=[opportunities_dataframe])\n",
|
" ui.load(get_table, inputs=[opportunities], outputs=[opportunities_dataframe])\n",
|
||||||
@@ -111,7 +114,7 @@
|
|||||||
" column_widths=[4, 1, 1, 1, 2],\n",
|
" column_widths=[4, 1, 1, 1, 2],\n",
|
||||||
" row_count=10,\n",
|
" row_count=10,\n",
|
||||||
" col_count=5,\n",
|
" col_count=5,\n",
|
||||||
" height=400,\n",
|
" max_height=400,\n",
|
||||||
" )\n",
|
" )\n",
|
||||||
"\n",
|
"\n",
|
||||||
" ui.load(get_table, inputs=[opportunities], outputs=[opportunities_dataframe])\n",
|
" ui.load(get_table, inputs=[opportunities], outputs=[opportunities_dataframe])\n",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class App:
|
|||||||
column_widths=[4, 1, 1, 1, 2],
|
column_widths=[4, 1, 1, 1, 2],
|
||||||
row_count=10,
|
row_count=10,
|
||||||
col_count=5,
|
col_count=5,
|
||||||
height=400,
|
max_height=400,
|
||||||
)
|
)
|
||||||
|
|
||||||
ui.load(start, inputs=[], outputs=[opportunities_dataframe])
|
ui.load(start, inputs=[], outputs=[opportunities_dataframe])
|
||||||
|
|||||||
Reference in New Issue
Block a user