Spaces:
Paused
Paused
update messgaing
Browse files
app.py
CHANGED
@@ -67,6 +67,7 @@ with gr.Blocks() as demo:
|
|
67 |
gr.HTML("""<a href="https://huggingface.co/spaces/ysharma/pix2pix-zero-01?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate this Space and upgrade to a GPU for fast Inference & no queue<br>""")
|
68 |
|
69 |
direction_html = gr.HTML(value="<h4>👇Upload a Dog or a Cat image here to get started👇</h4>", visible=True)
|
|
|
70 |
with gr.Row():
|
71 |
image_in = gr.Image(type="pil", label="Start by uploading an image of a Cat or a Dog that you want to translate")
|
72 |
#with gr.Box():
|
@@ -114,6 +115,8 @@ with gr.Blocks() as demo:
|
|
114 |
btn_imageedit.click(set_visible_true, [], btn_synth_image)
|
115 |
btn_imageedit.click(set_visible_true, [], image_synth)
|
116 |
btn_imageedit.click(set_visible_true, [], image_synth_translated)
|
|
|
|
|
117 |
btn_synth_image.click(synthetic_image_edit,[prompt_synth, task_name_radio],[image_synth, image_synth_translated])
|
118 |
|
119 |
image_in.clear(set_visible_true, [], btn_inversion)
|
|
|
67 |
gr.HTML("""<a href="https://huggingface.co/spaces/ysharma/pix2pix-zero-01?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate this Space and upgrade to a GPU for fast Inference & no queue<br>""")
|
68 |
|
69 |
direction_html = gr.HTML(value="<h4>👇Upload a Dog or a Cat image here to get started👇</h4>", visible=True)
|
70 |
+
refresh_direction_html = gr.HTML(value="<h4>👆Click the 'App' button to Refresh the space and try translation again with another Image</h4>", visible=False)
|
71 |
with gr.Row():
|
72 |
image_in = gr.Image(type="pil", label="Start by uploading an image of a Cat or a Dog that you want to translate")
|
73 |
#with gr.Box():
|
|
|
115 |
btn_imageedit.click(set_visible_true, [], btn_synth_image)
|
116 |
btn_imageedit.click(set_visible_true, [], image_synth)
|
117 |
btn_imageedit.click(set_visible_true, [], image_synth_translated)
|
118 |
+
|
119 |
+
image_out.change(set_visible_true, [], refresh_direction_html)
|
120 |
btn_synth_image.click(synthetic_image_edit,[prompt_synth, task_name_radio],[image_synth, image_synth_translated])
|
121 |
|
122 |
image_in.clear(set_visible_true, [], btn_inversion)
|