aliabd HF staff commited on
Commit
4f9d75c
1 Parent(s): 0b3543e

Upload with huggingface_hub

Browse files
Files changed (3) hide show
  1. requirements.txt +1 -1
  2. run.ipynb +1 -1
  3. run.py +24 -70
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
 
2
- https://gradio-main-build.s3.amazonaws.com/e3434dd4cb5f86bd54ed9dbdae010bcfffd146cc/gradio-3.15.0-py3-none-any.whl
 
1
 
2
+ https://gradio-main-build.s3.amazonaws.com/e7cca92831feedd7fb030df7bf8904fe1bf11aaf/gradio-3.15.0-py3-none-any.whl
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():\n", " txt = gr.Textbox(label=\"Small Textbox\", lines=1).style(\n", " rounded=False,\n", " border=False,\n", " container=False,\n", " )\n", "\n", " num = gr.Number(label=\"Number\", show_label=False).style(\n", " rounded=False,\n", " border=False,\n", " container=False,\n", " )\n", " slider = gr.Slider(label=\"Slider\", show_label=False).style(\n", " container=False,\n", " )\n", " check = gr.Checkbox(label=\"Checkbox\", show_label=False).style(\n", " rounded=False,\n", " border=False,\n", " container=False,\n", " )\n", " check_g = gr.CheckboxGroup(\n", " label=\"Checkbox Group\", choices=[\"One\", \"Two\", \"Three\"], show_label=False\n", " ).style(rounded=False, container=False, item_container=False)\n", " radio = gr.Radio(\n", " label=\"Radio\", choices=[\"One\", \"Two\", \"Three\"], show_label=False\n", " ).style(\n", " item_container=False,\n", " container=False,\n", " )\n", " drop = gr.Dropdown(\n", " label=\"Dropdown\", choices=[\"One\", \"Two\", \"Three\"], show_label=False\n", " ).style(\n", " rounded=False,\n", " border=False,\n", " container=False,\n", " )\n", " image = gr.Image(show_label=False).style(\n", " rounded=False,\n", " )\n", " video = gr.Video(show_label=False).style(\n", " rounded=False,\n", " )\n", " audio = gr.Audio(show_label=False).style(\n", " rounded=False,\n", " )\n", " file = gr.File(show_label=False).style(\n", " rounded=False,\n", " )\n", " df = gr.Dataframe(show_label=False).style(\n", " rounded=False,\n", " )\n", "\n", " ts = gr.Timeseries(show_label=False).style(\n", " rounded=False,\n", " )\n", " label = gr.Label().style(\n", " container=False,\n", " )\n", " highlight = gr.HighlightedText(\n", " \"+ hello. - goodbye\", show_label=False, color_map={\"+\": \"green\", \"-\": \"red\"}\n", " ).style(rounded=False, container=False)\n", " json = gr.JSON().style(container=False)\n", " html = gr.HTML(show_label=False).style()\n", " gallery = gr.Gallery().style(\n", " rounded=False,\n", " grid=(3, 3, 1),\n", " height=\"auto\",\n", " container=False,\n", " )\n", " chat = gr.Chatbot(\"hi\", color_map=(\"pink\", \"blue\")).style(\n", " rounded=False,\n", " )\n", "\n", " model = gr.Model3D().style(\n", " rounded=False,\n", " )\n", "\n", " gr.Plot().style()\n", " md = gr.Markdown(show_label=False).style()\n", "\n", " highlight = gr.HighlightedText().style(\n", " rounded=False,\n", " )\n", "\n", " btn = gr.Button(\"Run\").style(\n", " rounded=False,\n", " full_width=True,\n", " border=False,\n", " )\n", "\n", " # Not currently public\n", " # TODO: Uncomment at next release\n", " # gr.Dataset().style(\n", " # rounded=False,\n", " # margin=False,\n", " # border=False,\n", " # )\n", "\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
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\"], show_label=False\n", " ).style(\n", " item_container=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().style(\n", " container=False,\n", " )\n", " highlight = gr.HighlightedText(\n", " \"+ hello. - goodbye\",\n", " show_label=False,\n", " ).style(color_map={\"+\": \"green\", \"-\": \"red\"}, container=False)\n", " json = gr.JSON().style(container=False)\n", " html = gr.HTML(show_label=False)\n", " gallery = gr.Gallery().style(\n", " grid=(3, 3, 1),\n", " height=\"auto\",\n", " container=False,\n", " )\n", " chat = gr.Chatbot([(\"hi\", \"good bye\")]).style(color_map=(\"pink\", \"blue\"))\n", "\n", " model = gr.Model3D()\n", "\n", " md = gr.Markdown(show_label=False)\n", "\n", " highlight = gr.HighlightedText()\n", "\n", " btn = gr.Button(\"Run\").style(\n", " full_width=True,\n", " )\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
@@ -1,103 +1,57 @@
1
  import gradio as gr
2
 
3
  with gr.Blocks(title="Styling Examples") as demo:
4
- with gr.Column():
5
- txt = gr.Textbox(label="Small Textbox", lines=1).style(
6
- rounded=False,
7
- border=False,
8
- container=False,
9
- )
10
-
11
- num = gr.Number(label="Number", show_label=False).style(
12
- rounded=False,
13
- border=False,
14
- container=False,
15
- )
16
- slider = gr.Slider(label="Slider", show_label=False).style(
17
- container=False,
18
- )
19
- check = gr.Checkbox(label="Checkbox", show_label=False).style(
20
- rounded=False,
21
- border=False,
22
- container=False,
23
- )
24
  check_g = gr.CheckboxGroup(
25
- label="Checkbox Group", choices=["One", "Two", "Three"], show_label=False
26
- ).style(rounded=False, container=False, item_container=False)
 
 
27
  radio = gr.Radio(
28
  label="Radio", choices=["One", "Two", "Three"], show_label=False
29
  ).style(
30
  item_container=False,
31
- container=False,
32
  )
33
  drop = gr.Dropdown(
34
  label="Dropdown", choices=["One", "Two", "Three"], show_label=False
35
- ).style(
36
- rounded=False,
37
- border=False,
38
- container=False,
39
- )
40
- image = gr.Image(show_label=False).style(
41
- rounded=False,
42
- )
43
- video = gr.Video(show_label=False).style(
44
- rounded=False,
45
- )
46
- audio = gr.Audio(show_label=False).style(
47
- rounded=False,
48
- )
49
- file = gr.File(show_label=False).style(
50
- rounded=False,
51
- )
52
- df = gr.Dataframe(show_label=False).style(
53
- rounded=False,
54
- )
55
-
56
- ts = gr.Timeseries(show_label=False).style(
57
- rounded=False,
58
  )
 
 
 
 
 
 
59
  label = gr.Label().style(
60
  container=False,
61
  )
62
  highlight = gr.HighlightedText(
63
- "+ hello. - goodbye", show_label=False, color_map={"+": "green", "-": "red"}
64
- ).style(rounded=False, container=False)
 
65
  json = gr.JSON().style(container=False)
66
- html = gr.HTML(show_label=False).style()
67
  gallery = gr.Gallery().style(
68
- rounded=False,
69
  grid=(3, 3, 1),
70
  height="auto",
71
  container=False,
72
  )
73
- chat = gr.Chatbot("hi", color_map=("pink", "blue")).style(
74
- rounded=False,
75
- )
76
 
77
- model = gr.Model3D().style(
78
- rounded=False,
79
- )
80
 
81
- gr.Plot().style()
82
- md = gr.Markdown(show_label=False).style()
83
 
84
- highlight = gr.HighlightedText().style(
85
- rounded=False,
86
- )
87
 
88
  btn = gr.Button("Run").style(
89
- rounded=False,
90
  full_width=True,
91
- border=False,
92
  )
93
 
94
- # Not currently public
95
- # TODO: Uncomment at next release
96
- # gr.Dataset().style(
97
- # rounded=False,
98
- # margin=False,
99
- # border=False,
100
- # )
101
 
102
 
103
  if __name__ == "__main__":
 
1
  import gradio as gr
2
 
3
  with gr.Blocks(title="Styling Examples") as demo:
4
+ with gr.Column(variant="box"):
5
+ txt = gr.Textbox(label="Small Textbox", lines=1)
6
+ num = gr.Number(label="Number", show_label=False)
7
+ slider = gr.Slider(label="Slider", show_label=False)
8
+ check = gr.Checkbox(label="Checkbox", show_label=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  check_g = gr.CheckboxGroup(
10
+ label="Checkbox Group",
11
+ choices=["One", "Two", "Three"],
12
+ show_label=False,
13
+ )
14
  radio = gr.Radio(
15
  label="Radio", choices=["One", "Two", "Three"], show_label=False
16
  ).style(
17
  item_container=False,
 
18
  )
19
  drop = gr.Dropdown(
20
  label="Dropdown", choices=["One", "Two", "Three"], show_label=False
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  )
22
+ image = gr.Image(show_label=False)
23
+ video = gr.Video(show_label=False)
24
+ audio = gr.Audio(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().style(
29
  container=False,
30
  )
31
  highlight = gr.HighlightedText(
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().style(
 
38
  grid=(3, 3, 1),
39
  height="auto",
40
  container=False,
41
  )
42
+ chat = gr.Chatbot([("hi", "good bye")]).style(color_map=("pink", "blue"))
 
 
43
 
44
+ model = gr.Model3D()
 
 
45
 
46
+ md = gr.Markdown(show_label=False)
 
47
 
48
+ highlight = gr.HighlightedText()
 
 
49
 
50
  btn = gr.Button("Run").style(
 
51
  full_width=True,
 
52
  )
53
 
54
+ gr.Dataset(components=[txt, num])
 
 
 
 
 
 
55
 
56
 
57
  if __name__ == "__main__":