ysharma HF staff commited on
Commit
d2d0309
1 Parent(s): 2f8d44a

update code for examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,9 +9,9 @@ import os
9
  def inversion(image_in): #, progress=gr.Progress(track_tqdm=True)):
10
  #progress(0, desc="Starting...")
11
  # saving the input image
12
- image_in.save("assets/test_images/cats/input_image.png")
13
  # Run the script file
14
- subprocess.run(["python", "src/inversion.py", "--input_image", "assets/test_images/cats/input_image.png", "--results_folder", "output/test_cat"])
15
  # Open the text file with blip caption
16
  with open("output/test_cat/prompt/input_image.txt", "r") as file:
17
  # Read the file
 
9
  def inversion(image_in): #, progress=gr.Progress(track_tqdm=True)):
10
  #progress(0, desc="Starting...")
11
  # saving the input image
12
+ image_in.save("input_image.png") #("assets/test_images/cats/input_image.png")
13
  # Run the script file
14
+ subprocess.run(["python", "src/inversion.py", "--input_image", "input_image.png", "--results_folder", "output/test_cat"])
15
  # Open the text file with blip caption
16
  with open("output/test_cat/prompt/input_image.txt", "r") as file:
17
  # Read the file