aliabd HF staff commited on
Commit
64feb64
·
1 Parent(s): 751a58a

Upload with huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +6 -6
  2. app.py +104 -0
README.md CHANGED
@@ -1,12 +1,12 @@
 
1
  ---
2
- title: Blocks Style
3
- emoji: 😻
4
- colorFrom: green
5
- colorTo: green
6
  sdk: gradio
7
  sdk_version: 3.3.1
 
8
  app_file: app.py
9
  pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+
2
  ---
3
+ title: blocks_style
4
+ emoji: 🔥
5
+ colorFrom: indigo
6
+ colorTo: indigo
7
  sdk: gradio
8
  sdk_version: 3.3.1
9
+
10
  app_file: app.py
11
  pinned: false
12
  ---
 
 
app.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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__":
104
+ demo.launch()