noumanjavaid commited on
Commit
3bf0fbe
·
verified ·
1 Parent(s): d2c9cf6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -21
app.py CHANGED
@@ -180,7 +180,7 @@ def detect_watermark(det_im):
180
  # Gradio app
181
  with gr.Blocks() as app:
182
  with gr.Tab("Add Watermark"):
183
- cho = gr.Radio(choices=["stegan", "pnginfo"], value="stegan", label="Watermark Method") # Correct default value
184
  with gr.Row():
185
  with gr.Column():
186
  inp_im = gr.Image(label="Input Image", type="filepath")
@@ -204,23 +204,4 @@ with gr.Blocks() as app:
204
  det_btn.click(detect_watermark, inputs=[det_im], outputs=[det_msg])
205
 
206
  if __name__ == "__main__":
207
- app.launch(
208
- show_api=False
209
- )
210
-
211
- mark_btn.click(choose_encode, inputs=[inp_im, inp_mark, cho], outputs=[out_im, msg_box, file_output])
212
-
213
- with gr.Tab("Detect Watermark"):
214
- with gr.Row():
215
- with gr.Column():
216
- det_im = gr.Image(label="Watermarked Image", type="filepath")
217
- det_btn = gr.Button("Detect Watermark")
218
- with gr.Column():
219
- det_msg = gr.Textbox(label="Detected Watermark", lines=6)
220
-
221
- det_btn.click(detect_watermark, inputs=[det_im], outputs=[det_msg])
222
-
223
- if __name__ == "__main__":
224
- app.launch(
225
- show_api=False
226
- )
 
180
  # Gradio app
181
  with gr.Blocks() as app:
182
  with gr.Tab("Add Watermark"):
183
+ cho = gr.Radio(choices=["stegan", "pnginfo"], value="stegan", label="Watermark Method")
184
  with gr.Row():
185
  with gr.Column():
186
  inp_im = gr.Image(label="Input Image", type="filepath")
 
204
  det_btn.click(detect_watermark, inputs=[det_im], outputs=[det_msg])
205
 
206
  if __name__ == "__main__":
207
+ app.launch()