MaxMilan1 commited on
Commit
1949e8b
1 Parent(s): f7eb860

add theme, naming changes

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -15,8 +15,15 @@ _CITE_ = r"""
15
  ```
16
  """
17
 
 
 
 
 
 
 
18
 
19
- with gr.Blocks() as demo:
 
20
  with gr.Tab("Text to Image Generator"):
21
  with gr.Row(variant="panel"):
22
  with gr.Column():
@@ -33,7 +40,7 @@ with gr.Blocks() as demo:
33
  cache_examples=False,
34
  )
35
  with gr.Column():
36
- button_gen = gr.Button("Generate Image")
37
  gen_image = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
38
 
39
  button_gen.click(check_prompt, inputs=[prompt]).success(generate_image, inputs=[prompt, negative_prompt, control_image, scale], outputs=[gen_image])
@@ -107,4 +114,4 @@ with gr.Blocks() as demo:
107
  outputs=[output_model_obj]
108
  )
109
 
110
- demo.launch()
 
15
  ```
16
  """
17
 
18
+ theme = gr.themes.Soft(
19
+ primary_hue="orange",
20
+ secondary_hue="gray",
21
+ neutral_hue="slate",
22
+ font=['Montserrat', gr.themes.GoogleFont('ui-sans-serif'), 'system-ui', 'sans-serif'],
23
+ )
24
 
25
+
26
+ with gr.Blocks(theme=theme) as GenDemo:
27
  with gr.Tab("Text to Image Generator"):
28
  with gr.Row(variant="panel"):
29
  with gr.Column():
 
40
  cache_examples=False,
41
  )
42
  with gr.Column():
43
+ button_gen = gr.Button("Generate Image", elem_id="generateIm", variant="primary")
44
  gen_image = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
45
 
46
  button_gen.click(check_prompt, inputs=[prompt]).success(generate_image, inputs=[prompt, negative_prompt, control_image, scale], outputs=[gen_image])
 
114
  outputs=[output_model_obj]
115
  )
116
 
117
+ GenDemo.launch()