Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -5,7 +5,8 @@ emoji: 🔥
|
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
-
sdk_version: 3.
|
9 |
app_file: run.py
|
10 |
pinned: false
|
|
|
11 |
---
|
|
|
5 |
colorFrom: indigo
|
6 |
colorTo: indigo
|
7 |
sdk: gradio
|
8 |
+
sdk_version: 3.41.2
|
9 |
app_file: run.py
|
10 |
pinned: false
|
11 |
+
hf_oauth: true
|
12 |
---
|
run.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_style"]}, {"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(title=\"Styling Examples\") as demo:\n", " with gr.Column(variant=\"box\"):\n", " txt = gr.Textbox(label=\"Small Textbox\", lines=1)\n", " num = gr.Number(label=\"Number\", show_label=False)\n", " slider = gr.Slider(label=\"Slider\", show_label=False)\n", " check = gr.Checkbox(label=\"Checkbox\", show_label=False)\n", " check_g = gr.CheckboxGroup(\n", " label=\"Checkbox Group\",\n", " choices=[\"One\", \"Two\", \"Three\"],\n", " show_label=False,\n", " )\n", " radio = gr.Radio(\n", " label=\"Radio\", choices=[\"One\", \"Two\", \"Three\"]
|
|
|
1 |
+
{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_style"]}, {"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(title=\"Styling Examples\") as demo:\n", " with gr.Column(variant=\"box\"):\n", " txt = gr.Textbox(label=\"Small Textbox\", lines=1)\n", " num = gr.Number(label=\"Number\", show_label=False)\n", " slider = gr.Slider(label=\"Slider\", show_label=False)\n", " check = gr.Checkbox(label=\"Checkbox\", show_label=False)\n", " check_g = gr.CheckboxGroup(\n", " label=\"Checkbox Group\",\n", " choices=[\"One\", \"Two\", \"Three\"],\n", " show_label=False,\n", " )\n", " radio = gr.Radio(\n", " label=\"Radio\",\n", " choices=[\"One\", \"Two\", \"Three\"],\n", " show_label=False,\n", " )\n", " drop = gr.Dropdown(\n", " label=\"Dropdown\", choices=[\"One\", \"Two\", \"Three\"], show_label=False\n", " )\n", " image = gr.Image(show_label=False)\n", " video = gr.Video(show_label=False)\n", " audio = gr.Audio(show_label=False)\n", " file = gr.File(show_label=False)\n", " df = gr.Dataframe(show_label=False)\n", " ts = gr.Timeseries(show_label=False)\n", " label = gr.Label(container=False)\n", " highlight = gr.HighlightedText(\n", " [(\"hello\", None), (\"goodbye\", \"-\")],\n", " color_map={\"+\": \"green\", \"-\": \"red\"},\n", " container=False,\n", " )\n", " json = gr.JSON(container=False)\n", " html = gr.HTML(show_label=False)\n", " gallery = gr.Gallery(\n", " columns=(3, 3, 1),\n", " height=\"auto\",\n", " container=False,\n", " )\n", " chat = gr.Chatbot([(\"hi\", \"good bye\")])\n", "\n", " model = gr.Model3D()\n", "\n", " md = gr.Markdown(show_label=False)\n", "\n", " highlight = gr.HighlightedText()\n", "\n", " btn = gr.Button(\"Run\")\n", "\n", " gr.Dataset(components=[txt, num])\n", "\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
@@ -12,9 +12,9 @@ with gr.Blocks(title="Styling Examples") as demo:
|
|
12 |
show_label=False,
|
13 |
)
|
14 |
radio = gr.Radio(
|
15 |
-
label="Radio",
|
16 |
-
|
17 |
-
|
18 |
)
|
19 |
drop = gr.Dropdown(
|
20 |
label="Dropdown", choices=["One", "Two", "Three"], show_label=False
|
@@ -25,21 +25,20 @@ with gr.Blocks(title="Styling Examples") as demo:
|
|
25 |
file = gr.File(show_label=False)
|
26 |
df = gr.Dataframe(show_label=False)
|
27 |
ts = gr.Timeseries(show_label=False)
|
28 |
-
label = gr.Label()
|
|
|
|
|
|
|
29 |
container=False,
|
30 |
)
|
31 |
-
|
32 |
-
"+ hello. - goodbye",
|
33 |
-
show_label=False,
|
34 |
-
).style(color_map={"+": "green", "-": "red"}, container=False)
|
35 |
-
json = gr.JSON().style(container=False)
|
36 |
html = gr.HTML(show_label=False)
|
37 |
-
gallery = gr.Gallery(
|
38 |
-
|
39 |
height="auto",
|
40 |
container=False,
|
41 |
)
|
42 |
-
chat = gr.Chatbot([("hi", "good bye")])
|
43 |
|
44 |
model = gr.Model3D()
|
45 |
|
@@ -47,9 +46,7 @@ with gr.Blocks(title="Styling Examples") as demo:
|
|
47 |
|
48 |
highlight = gr.HighlightedText()
|
49 |
|
50 |
-
btn = gr.Button("Run")
|
51 |
-
full_width=True,
|
52 |
-
)
|
53 |
|
54 |
gr.Dataset(components=[txt, num])
|
55 |
|
|
|
12 |
show_label=False,
|
13 |
)
|
14 |
radio = gr.Radio(
|
15 |
+
label="Radio",
|
16 |
+
choices=["One", "Two", "Three"],
|
17 |
+
show_label=False,
|
18 |
)
|
19 |
drop = gr.Dropdown(
|
20 |
label="Dropdown", choices=["One", "Two", "Three"], show_label=False
|
|
|
25 |
file = gr.File(show_label=False)
|
26 |
df = gr.Dataframe(show_label=False)
|
27 |
ts = gr.Timeseries(show_label=False)
|
28 |
+
label = gr.Label(container=False)
|
29 |
+
highlight = gr.HighlightedText(
|
30 |
+
[("hello", None), ("goodbye", "-")],
|
31 |
+
color_map={"+": "green", "-": "red"},
|
32 |
container=False,
|
33 |
)
|
34 |
+
json = gr.JSON(container=False)
|
|
|
|
|
|
|
|
|
35 |
html = gr.HTML(show_label=False)
|
36 |
+
gallery = gr.Gallery(
|
37 |
+
columns=(3, 3, 1),
|
38 |
height="auto",
|
39 |
container=False,
|
40 |
)
|
41 |
+
chat = gr.Chatbot([("hi", "good bye")])
|
42 |
|
43 |
model = gr.Model3D()
|
44 |
|
|
|
46 |
|
47 |
highlight = gr.HighlightedText()
|
48 |
|
49 |
+
btn = gr.Button("Run")
|
|
|
|
|
50 |
|
51 |
gr.Dataset(components=[txt, num])
|
52 |
|