om-app commited on
Commit
c89c7b2
·
1 Parent(s): 45343b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import os
3
  from share_btn import community_icon_html, loading_icon_html, share_js
4
- import js2py
5
 
6
  text_gen = gr.Interface.load(name="spaces/Gustavosta/MagicPrompt-Stable-Diffusion")
7
  stable_diffusion = gr.Blocks.load(name="spaces/runwayml/stable-diffusion-v1-5")
@@ -12,7 +12,6 @@ stable_diffusion = gr.Blocks.load(name="spaces/runwayml/stable-diffusion-v1-5")
12
  def get_images(prompt):
13
  gallery_dir = stable_diffusion(prompt, fn_index=2)
14
  sd_output = [os.path.join(gallery_dir, image) for image in os.listdir(gallery_dir)]
15
- js2py.eval_js('alert( "Hello World!" )')
16
  return sd_output, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
17
 
18
  def get_prompts(prompt_text):
 
1
  import gradio as gr
2
  import os
3
  from share_btn import community_icon_html, loading_icon_html, share_js
4
+
5
 
6
  text_gen = gr.Interface.load(name="spaces/Gustavosta/MagicPrompt-Stable-Diffusion")
7
  stable_diffusion = gr.Blocks.load(name="spaces/runwayml/stable-diffusion-v1-5")
 
12
  def get_images(prompt):
13
  gallery_dir = stable_diffusion(prompt, fn_index=2)
14
  sd_output = [os.path.join(gallery_dir, image) for image in os.listdir(gallery_dir)]
 
15
  return sd_output, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
16
 
17
  def get_prompts(prompt_text):