gsbm commited on
Commit
ed270ca
·
verified ·
1 Parent(s): 057a810

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +81 -5
run.py CHANGED
@@ -3,11 +3,87 @@ import gradio as gr
3
  def greet(name, intensity):
4
  return "Hello, " + name + "!" * intensity
5
 
6
- demo = gr.Interface(
7
- fn=greet,
8
- inputs=["text", gr.Slider(value=2, minimum=1, maximum=10, step=1)],
9
- outputs=[gr.Textbox(label="greeting", lines=3)],
10
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  if __name__ == "__main__":
13
  demo.launch()
 
3
  def greet(name, intensity):
4
  return "Hello, " + name + "!" * intensity
5
 
6
+ css = """
7
+ :root {
8
+ --name: default !important;
9
+ --primary-50: #fef8f3 !important;
10
+ --primary-100: #ffe4cc !important;
11
+ --primary-200: #fdc39c !important;
12
+ --primary-300: #fc9a64 !important;
13
+ --primary-400: #f9732e !important;
14
+ --primary-500: #f54d00 !important;
15
+ --primary-600: #d63d00 !important;
16
+ --primary-700: #a82e00 !important;
17
+ --primary-800: #7d2200 !important;
18
+ --primary-900: #5f1900 !important;
19
+ --primary-950: #4b1500 !important;
20
+ --secondary-50: #eef7ff !important;
21
+ --secondary-100: #cdeaff !important;
22
+ --secondary-200: #a9dcff !important;
23
+ --secondary-300: #76c9ff !important;
24
+ --secondary-400: #3db5ff !important;
25
+ --secondary-500: #009dff !important;
26
+ --secondary-600: #007ccf !important;
27
+ --secondary-700: #005ea0 !important;
28
+ --secondary-800: #004275 !important;
29
+ --secondary-900: #002d52 !important;
30
+ --secondary-950: #002040 !important;
31
+ --neutral-50: #fafafa !important;
32
+ --neutral-100: #f4f5f7 !important;
33
+ --neutral-200: #e7e9eb !important;
34
+ --neutral-300: #d3d6db !important;
35
+ --neutral-400: #a0a4af !important;
36
+ --neutral-500: #7a7f8e !important;
37
+ --neutral-600: #545965 !important;
38
+ --neutral-700: #3c4350 !important;
39
+ --neutral-800: #2a303c !important;
40
+ --neutral-900: #161b26 !important;
41
+ --neutral-950: #0f131b !important;
42
+ --spacing-xxs: 1px !important;
43
+ --spacing-xs: 2px !important;
44
+ --spacing-sm: 4px !important;
45
+ --spacing-md: 6px !important;
46
+ --spacing-lg: 8px !important;
47
+ --spacing-xl: 10px !important;
48
+ --spacing-xxl: 16px !important;
49
+ --radius-xxs: 1px !important;
50
+ --radius-xs: 2px !important;
51
+ --radius-sm: 4px !important;
52
+ --radius-md: 6px !important;
53
+ --radius-lg: 8px !important;
54
+ --radius-xl: 12px !important;
55
+ --radius-xxl: 22px !important;
56
+ --text-xxs: 9px !important;
57
+ --text-xs: 10px !important;
58
+ --text-sm: 12px !important;
59
+ --text-md: 14px !important;
60
+ --text-lg: 16px !important;
61
+ --text-xl: 22px !important;
62
+ --text-xxl: 26px !important;
63
+ --font: 'Source Sans Pro', 'ui-sans-serif', 'system-ui', sans-serif !important;
64
+ --font-mono: 'IBM Plex Mono', 'ui-monospace', 'Consolas', monospace !important;
65
+ --shadow-drop: rgba(0,0,0,0.05) 0px 1px 2px 0px !important;
66
+ --shadow-drop-lg: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important;
67
+ --shadow-inset: rgba(0,0,0,0.05) 0px 2px 4px 0px inset !important;
68
+ --shadow-spread: 3px !important;
69
+ --error-background-fill: #fef2f2 !important;
70
+ --error-border-color: #b91c1c !important;
71
+ --error-border-width: 1px !important;
72
+ --error-text-color: #b91c1c !important;
73
+ --error-icon-color: #b91c1c !important;
74
+ --input-background-fill: white !important;
75
+ --input-border-width: 1px !important;
76
+ --loader-color: var(--color-accent) !important;
77
+ --slider-color: #2563eb !important;
78
+ }
79
+ """
80
+
81
+ with gr.Blocks(css=css) as demo:
82
+ gr.Interface(
83
+ fn=greet,
84
+ inputs=["text", gr.Slider(value=2, minimum=1, maximum=10, step=1)],
85
+ outputs=[gr.Textbox(label="greeting", lines=3)],
86
+ )
87
 
88
  if __name__ == "__main__":
89
  demo.launch()