ysharma HF staff commited on
Commit
d4188d5
1 Parent(s): f387404

update inversion

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ import gradio as gr
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("input_image.png")
12
  # Run the script file
13
  subprocess.run(["python", "src/inversion.py", "--input_image", "input_image.png", "--results_folder", "output/test_cat"])
14
  # Open the text file with blip caption
@@ -65,7 +65,7 @@ with gr.Blocks() as demo:
65
  image_out = gr.Image(visible=False)
66
  with gr.Column():
67
  task_name_radio = gr.Radio(choices = ["cat2dog", "dog2cat",], type="value", visible=False, label="Select a task that you want to accomplish") #, value="cat2dog"),
68
- btn_imageedit = gr.Button(value="Edit the image!",visible=False)
69
 
70
 
71
  btn_inversion.click(inversion,[image_in],[inversion_file, blip_prompt])
 
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
13
  subprocess.run(["python", "src/inversion.py", "--input_image", "input_image.png", "--results_folder", "output/test_cat"])
14
  # Open the text file with blip caption
 
65
  image_out = gr.Image(visible=False)
66
  with gr.Column():
67
  task_name_radio = gr.Radio(choices = ["cat2dog", "dog2cat",], type="value", visible=False, label="Select a task that you want to accomplish") #, value="cat2dog"),
68
+ btn_imageedit = gr.Button(value="Translate the image!",visible=False)
69
 
70
 
71
  btn_inversion.click(inversion,[image_in],[inversion_file, blip_prompt])