gsbm commited on
Commit
231c313
·
verified ·
1 Parent(s): f1858a2

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +40 -42
run.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
2
 
3
  def greet(name, intensity):
4
- global css
5
- css = """
 
6
  :root {
7
  --name: default !important;
8
  --primary-50: #faf8fc !important;
@@ -38,47 +39,44 @@ def greet(name, intensity):
38
  --neutral-800: #505b7d !important;
39
  --neutral-900: #434d65 !important;
40
  --neutral-950: #2c303f !important;
41
- --spacing-xxs: 1px !important;
42
- --spacing-xs: 2px !important;
43
- --spacing-sm: 4px !important;
44
- --spacing-md: 6px !important;
45
- --spacing-lg: 8px !important;
46
- --spacing-xl: 10px !important;
47
- --spacing-xxl: 16px !important;
48
- --radius-xxs: 1px !important;
49
- --radius-xs: 2px !important;
50
- --radius-sm: 4px !important;
51
- --radius-md: 6px !important;
52
- --radius-lg: 8px !important;
53
- --radius-xl: 12px !important;
54
- --radius-xxl: 22px !important;
55
- --text-xxs: 9px !important;
56
- --text-xs: 10px !important;
57
- --text-sm: 12px !important;
58
- --text-md: 14px !important;
59
- --text-lg: 16px !important;
60
- --text-xl: 22px !important;
61
- --text-xxl: 26px !important;
62
- --font: 'Source Sans Pro', 'ui-sans-serif', 'system-ui', sans-serif !important;
63
- --font-mono: 'IBM Plex Mono', 'ui-monospace', 'Consolas', monospace !important;
64
- --shadow-drop: rgba(0,0,0,0.05) 0px 1px 2px 0px !important;
65
- --shadow-drop-lg: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important;
66
- --shadow-inset: rgba(0,0,0,0.05) 0px 2px 4px 0px inset !important;
67
- --shadow-spread: 3px !important;
68
- --error-background-fill: #fef2f2 !important;
69
- --error-border-color: #b91c1c !important;
70
- --error-border-width: 1px !important;
71
- --error-text-color: #b91c1c !important;
72
- --error-icon-color: #b91c1c !important;
73
- --input-background-fill: white !important;
74
- --input-border-width: 1px !important;
75
- --loader-color: var(--color-accent) !important;
76
- --slider-color: #2563eb !important;
77
  }
78
- """
79
- return "Hello, " + name + "!" * intensity
80
-
81
- css = ""
82
 
83
  with gr.Blocks(css=css) as demo:
84
  gr.Interface(
 
1
  import gradio as gr
2
 
3
  def greet(name, intensity):
4
+ return "Hello, " + name + "!" * intensity
5
+
6
+ css = """
7
  :root {
8
  --name: default !important;
9
  --primary-50: #faf8fc !important;
 
39
  --neutral-800: #505b7d !important;
40
  --neutral-900: #434d65 !important;
41
  --neutral-950: #2c303f !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(