ysharma HF staff commited on
Commit
d38f1ca
1 Parent(s): e5f16f0

update progress bar

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
6
  # It will save the inversion as output/test_cat/inversion/image-name.pt
7
  # BLIP-generated caption prompt is saved as output/test_cat/prompt/image-name.txt - eg., a painting of a cat sitting on top of a ball
8
  def inversion(image_in): #, progress=gr.Progress(track_tqdm=True)):
9
- progress(0, desc="Starting...")
10
  # saving the input image
11
  image_in.save("assets/test_images/cats/input_image.png")
12
  # Run the script file
@@ -21,7 +21,7 @@ def inversion(image_in): #, progress=gr.Progress(track_tqdm=True)):
21
  # Performing image editing with the editing directions
22
  # This will save the edited image as output/test_cat/edit/image-name.png
23
  def image_edit(task_name): #, progress=gr.Progress(track_tqdm=True)):
24
- progress(0, desc="Starting...")
25
  # Run the script file
26
  subprocess.run(["python", "src/edit_real.py", "--inversion", "output/test_cat/inversion/input_image.pt",
27
  "--prompt", "output/test_cat/prompt/input_image.txt", "--task_name", task_name,
@@ -31,7 +31,7 @@ def image_edit(task_name): #, progress=gr.Progress(track_tqdm=True)):
31
 
32
  #Similarly, we can edit the synthetic images generated by Stable Diffusion with the following command.
33
  def synthetic_image_edit(prompt, task_name): #, progress=gr.Progress(track_tqdm=True)):
34
- progress(0, desc="Starting...")
35
  # Run the script file
36
  subprocess.run(["python", "src/edit_synthetic.py", "--prompt_str", prompt,
37
  "--task", task_name, "--results_folder", "output/synth_editing"])
 
6
  # It will save the inversion as output/test_cat/inversion/image-name.pt
7
  # BLIP-generated caption prompt is saved as output/test_cat/prompt/image-name.txt - eg., a painting of a cat sitting on top of a ball
8
  def inversion(image_in): #, progress=gr.Progress(track_tqdm=True)):
9
+ #progress(0, desc="Starting...")
10
  # saving the input image
11
  image_in.save("assets/test_images/cats/input_image.png")
12
  # Run the script file
 
21
  # Performing image editing with the editing directions
22
  # This will save the edited image as output/test_cat/edit/image-name.png
23
  def image_edit(task_name): #, progress=gr.Progress(track_tqdm=True)):
24
+ #progress(0, desc="Starting...")
25
  # Run the script file
26
  subprocess.run(["python", "src/edit_real.py", "--inversion", "output/test_cat/inversion/input_image.pt",
27
  "--prompt", "output/test_cat/prompt/input_image.txt", "--task_name", task_name,
 
31
 
32
  #Similarly, we can edit the synthetic images generated by Stable Diffusion with the following command.
33
  def synthetic_image_edit(prompt, task_name): #, progress=gr.Progress(track_tqdm=True)):
34
+ #progress(0, desc="Starting...")
35
  # Run the script file
36
  subprocess.run(["python", "src/edit_synthetic.py", "--prompt_str", prompt,
37
  "--task", task_name, "--results_folder", "output/synth_editing"])