Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
run.ipynb
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: blocks_layout"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "
|
|
|
|
| 1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: blocks_layout"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "demo = gr.Blocks()\n", "\n", "with demo:\n", " with gr.Row():\n", " gr.Image(interactive=True, scale=2)\n", " gr.Image()\n", " with gr.Row():\n", " gr.Textbox(label=\"Text\")\n", " gr.Number(label=\"Count\", scale=2)\n", " gr.Radio(choices=[\"One\", \"Two\"])\n", " with gr.Row():\n", " gr.Button(\"500\", scale=0, min_width=500)\n", " gr.Button(\"A\", scale=0)\n", " gr.Button(\"grow\")\n", " with gr.Row():\n", " gr.Textbox()\n", " gr.Textbox()\n", " gr.Button()\n", " with gr.Row():\n", " with gr.Row():\n", " with gr.Column():\n", " gr.Textbox(label=\"Text\")\n", " gr.Number(label=\"Count\")\n", " gr.Radio(choices=[\"One\", \"Two\"])\n", " gr.Image()\n", " with gr.Column():\n", " gr.Image(interactive=True)\n", " gr.Image()\n", " gr.Image()\n", " gr.Textbox(label=\"Text\")\n", " gr.Number(label=\"Count\")\n", " gr.Radio(choices=[\"One\", \"Two\"])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
demo = gr.Blocks()
|
| 5 |
|
| 6 |
with demo:
|
|
@@ -18,7 +17,7 @@ with demo:
|
|
| 18 |
with gr.Row():
|
| 19 |
gr.Textbox()
|
| 20 |
gr.Textbox()
|
| 21 |
-
gr.Button()
|
| 22 |
with gr.Row():
|
| 23 |
with gr.Row():
|
| 24 |
with gr.Column():
|
|
@@ -34,6 +33,5 @@ with demo:
|
|
| 34 |
gr.Number(label="Count")
|
| 35 |
gr.Radio(choices=["One", "Two"])
|
| 36 |
|
| 37 |
-
|
| 38 |
if __name__ == "__main__":
|
| 39 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
| 3 |
demo = gr.Blocks()
|
| 4 |
|
| 5 |
with demo:
|
|
|
|
| 17 |
with gr.Row():
|
| 18 |
gr.Textbox()
|
| 19 |
gr.Textbox()
|
| 20 |
+
gr.Button()
|
| 21 |
with gr.Row():
|
| 22 |
with gr.Row():
|
| 23 |
with gr.Column():
|
|
|
|
| 33 |
gr.Number(label="Count")
|
| 34 |
gr.Radio(choices=["One", "Two"])
|
| 35 |
|
|
|
|
| 36 |
if __name__ == "__main__":
|
| 37 |
demo.launch()
|