pix2pix-zero / app.py
multimodalart's picture
Test1
dbaf842
raw
history blame
536 Bytes
import os
import gradio as gr
def update(name):
os.system('''python src/inversion.py \
--input_image "assets/test_images/cats/cat_1.png" \
--results_folder "output/test_cat"
''')
return f"Inverted!"
with gr.Blocks() as demo:
gr.Markdown("Start typing below and then click **Run** to see the output.")
with gr.Row():
inp = gr.Textbox(placeholder="Do you want to invert?")
out = gr.Textbox()
btn = gr.Button("Run")
btn.click(fn=update, inputs=inp, outputs=out)
demo.launch()