Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -17,13 +17,15 @@ from fastapi import FastAPI
|
|
17 |
app = FastAPI()
|
18 |
|
19 |
#----------Start of theme----------
|
20 |
-
theme = gr.themes.
|
21 |
primary_hue="zinc",
|
22 |
-
secondary_hue="
|
|
|
23 |
font=[gr.themes.GoogleFont('Kavivanar'), gr.themes.GoogleFont('Kavivanar'), 'system-ui', 'sans-serif'],
|
24 |
font_mono=[gr.themes.GoogleFont('Source Code Pro'), gr.themes.GoogleFont('Inconsolata'), gr.themes.GoogleFont('Inconsolata'), 'monospace'],
|
25 |
).set(
|
26 |
-
|
|
|
27 |
body_text_color='secondary_600',
|
28 |
body_text_color_subdued='*primary_500',
|
29 |
body_text_weight='500',
|
@@ -32,6 +34,7 @@ theme = gr.themes.Soft(
|
|
32 |
color_accent='*primary_300',
|
33 |
border_color_accent_subdued='*primary_400',
|
34 |
border_color_primary='*primary_400',
|
|
|
35 |
block_background_fill='*primary_300',
|
36 |
block_border_width='*panel_border_width',
|
37 |
block_info_text_color='*primary_700',
|
@@ -42,10 +45,21 @@ theme = gr.themes.Soft(
|
|
42 |
table_text_color='*primary_600',
|
43 |
input_background_fill='*primary_50',
|
44 |
input_background_fill_focus='*primary_100',
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
button_cancel_background_fill='*primary_500',
|
50 |
button_cancel_background_fill_hover='*primary_400'
|
51 |
)
|
@@ -182,7 +196,7 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
|
182 |
seed_output = gr.Textbox(label="Seed Used", show_copy_button = True, elem_id="seed-output")
|
183 |
|
184 |
with gr.Row():
|
185 |
-
text_button = gr.Button("
|
186 |
clr_button =gr.Button("Clear Prompt",variant="primary", elem_id="clear_button")
|
187 |
clr_button.click(lambda: gr.Textbox(value=""), None, text_prompt)
|
188 |
|
|
|
17 |
app = FastAPI()
|
18 |
|
19 |
#----------Start of theme----------
|
20 |
+
theme = gr.themes.Ocean(
|
21 |
primary_hue="zinc",
|
22 |
+
secondary_hue="slate",
|
23 |
+
neutral_hue="neutral",
|
24 |
font=[gr.themes.GoogleFont('Kavivanar'), gr.themes.GoogleFont('Kavivanar'), 'system-ui', 'sans-serif'],
|
25 |
font_mono=[gr.themes.GoogleFont('Source Code Pro'), gr.themes.GoogleFont('Inconsolata'), gr.themes.GoogleFont('Inconsolata'), 'monospace'],
|
26 |
).set(
|
27 |
+
#Body Settings
|
28 |
+
body_background_fill='*primary_100',
|
29 |
body_text_color='secondary_600',
|
30 |
body_text_color_subdued='*primary_500',
|
31 |
body_text_weight='500',
|
|
|
34 |
color_accent='*primary_300',
|
35 |
border_color_accent_subdued='*primary_400',
|
36 |
border_color_primary='*primary_400',
|
37 |
+
block_radius='*radius_md',
|
38 |
block_background_fill='*primary_300',
|
39 |
block_border_width='*panel_border_width',
|
40 |
block_info_text_color='*primary_700',
|
|
|
45 |
table_text_color='*primary_600',
|
46 |
input_background_fill='*primary_50',
|
47 |
input_background_fill_focus='*primary_100',
|
48 |
+
|
49 |
+
#Button Settings
|
50 |
+
button_border_width='1px',
|
51 |
+
button_transform_hover='scale(1.02)',
|
52 |
+
button_transition='all 0.1s ease-in-out',
|
53 |
+
button_transform_active='Scale(0.9)',
|
54 |
+
button_large_radius='*radius_xl',
|
55 |
+
button_medium_radius='*radius_xl',
|
56 |
+
button_small_radius='*radius_xl',
|
57 |
+
button_primary_border_color='*primary_500',
|
58 |
+
button_secondary_border_color='*primary_400',
|
59 |
+
button_primary_background_fill_hover='linear-gradient(90deg, *primary_400, *secondary_200, *primary_400)',
|
60 |
+
button_primary_background_fill='linear-gradient(90deg,*secondary_300 , *primary_500, *secondary_300)',
|
61 |
+
button_primary_text_color='*primary_100',
|
62 |
+
button_primary_text_color_hover='*primary_700',
|
63 |
button_cancel_background_fill='*primary_500',
|
64 |
button_cancel_background_fill_hover='*primary_400'
|
65 |
)
|
|
|
196 |
seed_output = gr.Textbox(label="Seed Used", show_copy_button = True, elem_id="seed-output")
|
197 |
|
198 |
with gr.Row():
|
199 |
+
text_button = gr.Button("Generate Image", variant='primary', elem_id="gen-button")
|
200 |
clr_button =gr.Button("Clear Prompt",variant="primary", elem_id="clear_button")
|
201 |
clr_button.click(lambda: gr.Textbox(value=""), None, text_prompt)
|
202 |
|