awacke1 commited on
Commit
3967aa7
1 Parent(s): b5a5a33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -8
app.py CHANGED
@@ -6,7 +6,6 @@ text_gen = gr.Interface.load(name="spaces/Gustavosta/MagicPrompt-Stable-Diffusio
6
  stable_diffusion = gr.Blocks.load(name="spaces/runwayml/stable-diffusion-v1-5")
7
 
8
  def get_images(prompt):
9
-
10
  gallery_dir = stable_diffusion(prompt, fn_index=2)
11
  sd_output = [os.path.join(gallery_dir, image) for image in os.listdir(gallery_dir)]
12
  return sd_output, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
@@ -44,7 +43,6 @@ css = '''
44
  }
45
  a {text-decoration-line: underline;}
46
  '''
47
-
48
  with gr.Blocks(css=css) as demo:
49
  gr.HTML("""<div style="text-align: center; max-width: 700px; margin: 0 auto;">
50
  <div
@@ -63,7 +61,6 @@ with gr.Blocks(css=css) as demo:
63
  🏭 Prompt Refinery generates variations of your prompt using <a href="https://huggingface.co/spaces/Gustavosta/MagicPrompt-Stable-Diffusion" target="_blank">MagicPrompt and Stable Diffusion</a>
64
  </p>
65
  </div>""")
66
-
67
  with gr.Row():
68
  with gr.Column():
69
  input_text = gr.Textbox(label="Input text prompt",
@@ -84,7 +81,6 @@ with gr.Blocks(css=css) as demo:
84
  with gr.Group(elem_id="share-btn-container"):
85
  community_icon = gr.HTML(community_icon_html, visible=False)
86
  loading_icon = gr.HTML(loading_icon_html, visible=False)
87
-
88
  see_prompts.click(get_prompts,
89
  inputs = [input_text],
90
  outputs = [
@@ -95,8 +91,4 @@ with gr.Blocks(css=css) as demo:
95
  text_output
96
  ],
97
  outputs = [sd_output, community_icon, loading_icon], api_name="TextAI2")
98
- share_button.click(None, [], [], _js=share_js)
99
-
100
-
101
-
102
  demo.launch(debug=True)
 
6
  stable_diffusion = gr.Blocks.load(name="spaces/runwayml/stable-diffusion-v1-5")
7
 
8
  def get_images(prompt):
 
9
  gallery_dir = stable_diffusion(prompt, fn_index=2)
10
  sd_output = [os.path.join(gallery_dir, image) for image in os.listdir(gallery_dir)]
11
  return sd_output, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
 
43
  }
44
  a {text-decoration-line: underline;}
45
  '''
 
46
  with gr.Blocks(css=css) as demo:
47
  gr.HTML("""<div style="text-align: center; max-width: 700px; margin: 0 auto;">
48
  <div
 
61
  🏭 Prompt Refinery generates variations of your prompt using <a href="https://huggingface.co/spaces/Gustavosta/MagicPrompt-Stable-Diffusion" target="_blank">MagicPrompt and Stable Diffusion</a>
62
  </p>
63
  </div>""")
 
64
  with gr.Row():
65
  with gr.Column():
66
  input_text = gr.Textbox(label="Input text prompt",
 
81
  with gr.Group(elem_id="share-btn-container"):
82
  community_icon = gr.HTML(community_icon_html, visible=False)
83
  loading_icon = gr.HTML(loading_icon_html, visible=False)
 
84
  see_prompts.click(get_prompts,
85
  inputs = [input_text],
86
  outputs = [
 
91
  text_output
92
  ],
93
  outputs = [sd_output, community_icon, loading_icon], api_name="TextAI2")
 
 
 
 
94
  demo.launch(debug=True)