Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -5,7 +5,7 @@ emoji: 🔥
|
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
-
sdk_version:
|
9 |
app_file: run.py
|
10 |
pinned: false
|
11 |
hf_oauth: true
|
|
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
+
sdk_version: 5.0.0
|
9 |
app_file: run.py
|
10 |
pinned: false
|
11 |
hf_oauth: true
|
run.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: button_component"]}, {"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", "with gr.Blocks() as demo:\n", " gr.Button()\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
|
|
1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: button_component"]}, {"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", "icon = \"https://cdn.icon-icons.com/icons2/2620/PNG/512/among_us_player_red_icon_156942.png\"\n", "with gr.Blocks() as demo:\n", " with gr.Row():\n", " gr.Button(variant=\"primary\")\n", " gr.Button(variant=\"secondary\")\n", " gr.Button(variant=\"stop\")\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\")\n", " gr.Button(variant=\"secondary\", size=\"sm\")\n", " gr.Button(variant=\"stop\", size=\"sm\")\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", icon=icon)\n", " gr.Button(variant=\"secondary\", icon=icon)\n", " gr.Button(variant=\"stop\", icon=icon)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\", icon=icon)\n", " gr.Button(variant=\"secondary\", size=\"sm\", icon=icon)\n", " gr.Button(variant=\"stop\", size=\"sm\", icon=icon)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", icon=icon, interactive=False)\n", " gr.Button(variant=\"secondary\", icon=icon, interactive=False)\n", " gr.Button(variant=\"stop\", icon=icon, interactive=False)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\", icon=icon, interactive=False)\n", " gr.Button(variant=\"secondary\", size=\"sm\", icon=icon, interactive=False)\n", " gr.Button(variant=\"stop\", size=\"sm\", icon=icon, interactive=False)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", interactive=False)\n", " gr.Button(variant=\"secondary\", interactive=False)\n", " gr.Button(variant=\"stop\", interactive=False)\n", "\n", " with gr.Row():\n", " gr.Button(variant=\"primary\", size=\"sm\", interactive=False)\n", " gr.Button(variant=\"secondary\", size=\"sm\", interactive=False)\n", " gr.Button(variant=\"stop\", size=\"sm\", interactive=False)\n", "\n", " with gr.Group():\n", " gr.Button(variant=\"primary\")\n", " gr.Button(variant=\"primary\")\n", " gr.Button(variant=\"secondary\")\n", " gr.Button(variant=\"secondary\")\n", " gr.Button(variant=\"stop\")\n", " gr.Button(variant=\"stop\")\n", "\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
@@ -1,6 +1,52 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
3 |
with gr.Blocks() as demo:
|
4 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
icon = "https://cdn.icon-icons.com/icons2/2620/PNG/512/among_us_player_red_icon_156942.png"
|
4 |
with gr.Blocks() as demo:
|
5 |
+
with gr.Row():
|
6 |
+
gr.Button(variant="primary")
|
7 |
+
gr.Button(variant="secondary")
|
8 |
+
gr.Button(variant="stop")
|
9 |
+
with gr.Row():
|
10 |
+
gr.Button(variant="primary", size="sm")
|
11 |
+
gr.Button(variant="secondary", size="sm")
|
12 |
+
gr.Button(variant="stop", size="sm")
|
13 |
+
with gr.Row():
|
14 |
+
gr.Button(variant="primary", icon=icon)
|
15 |
+
gr.Button(variant="secondary", icon=icon)
|
16 |
+
gr.Button(variant="stop", icon=icon)
|
17 |
+
|
18 |
+
with gr.Row():
|
19 |
+
gr.Button(variant="primary", size="sm", icon=icon)
|
20 |
+
gr.Button(variant="secondary", size="sm", icon=icon)
|
21 |
+
gr.Button(variant="stop", size="sm", icon=icon)
|
22 |
+
|
23 |
+
with gr.Row():
|
24 |
+
gr.Button(variant="primary", icon=icon, interactive=False)
|
25 |
+
gr.Button(variant="secondary", icon=icon, interactive=False)
|
26 |
+
gr.Button(variant="stop", icon=icon, interactive=False)
|
27 |
+
|
28 |
+
with gr.Row():
|
29 |
+
gr.Button(variant="primary", size="sm", icon=icon, interactive=False)
|
30 |
+
gr.Button(variant="secondary", size="sm", icon=icon, interactive=False)
|
31 |
+
gr.Button(variant="stop", size="sm", icon=icon, interactive=False)
|
32 |
+
|
33 |
+
with gr.Row():
|
34 |
+
gr.Button(variant="primary", interactive=False)
|
35 |
+
gr.Button(variant="secondary", interactive=False)
|
36 |
+
gr.Button(variant="stop", interactive=False)
|
37 |
+
|
38 |
+
with gr.Row():
|
39 |
+
gr.Button(variant="primary", size="sm", interactive=False)
|
40 |
+
gr.Button(variant="secondary", size="sm", interactive=False)
|
41 |
+
gr.Button(variant="stop", size="sm", interactive=False)
|
42 |
+
|
43 |
+
with gr.Group():
|
44 |
+
gr.Button(variant="primary")
|
45 |
+
gr.Button(variant="primary")
|
46 |
+
gr.Button(variant="secondary")
|
47 |
+
gr.Button(variant="secondary")
|
48 |
+
gr.Button(variant="stop")
|
49 |
+
gr.Button(variant="stop")
|
50 |
+
|
51 |
|
52 |
demo.launch()
|