VinayHajare commited on
Commit
b09e41b
Β·
verified Β·
1 Parent(s): 346c08e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
6
 
7
  from utils import read_css_from_file
8
  from inference import generate_image_from_text, generate_image_from_text_with_persistent_storage
9
-
10
  # Read CSS from file
11
  css = read_css_from_file("style.css")
12
 
@@ -27,10 +27,15 @@ DESCRIPTION = '''
27
  <div id="content_align" style="margin-top: 10px;">
28
  </div>
29
  '''
30
-
 
 
 
31
  # Creating Gradio interface
32
  with gr.Blocks(css=css) as app:
33
- raise gr.Info("This πŸ’» demo uses the EfficientCLIP-GAN model which is trained on CUB dataset 🐦πŸ₯.\nKeep your prompt coherent to the birds domain.\nIf you like the demo, don't forget to click on the like πŸ’– button.")
 
 
34
  gr.Markdown(DESCRIPTION)
35
  with gr.Row():
36
  with gr.Column():
 
6
 
7
  from utils import read_css_from_file
8
  from inference import generate_image_from_text, generate_image_from_text_with_persistent_storage
9
+ greeted = False
10
  # Read CSS from file
11
  css = read_css_from_file("style.css")
12
 
 
27
  <div id="content_align" style="margin-top: 10px;">
28
  </div>
29
  '''
30
+ def greet():
31
+ gr.Info("This πŸ’» demo uses the EfficientCLIP-GAN model which is trained on CUB dataset 🐦πŸ₯.\nKeep your prompt coherent to the birds domain.\nIf you like the demo, don't forget to click on the like πŸ’– button.")
32
+ greeted = True
33
+
34
  # Creating Gradio interface
35
  with gr.Blocks(css=css) as app:
36
+ if(not greeted):
37
+ greet()
38
+
39
  gr.Markdown(DESCRIPTION)
40
  with gr.Row():
41
  with gr.Column():