Spaces:
Paused
Paused
update inversion
Browse files
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="
|
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])
|