karwanjiru commited on
Commit
06339aa
1 Parent(s): b043438

image moderation fixed

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -211,13 +211,7 @@ with gr.Blocks(css=css) as demo:
211
  generate_image_button.click(generate_image, image_prompt, generated_image)
212
 
213
  with gr.TabItem("Moderate Image"):
214
- uploaded_image = gr.Image(label="Upload Image")
215
- moderate_image_button = gr.Button("Moderate Image")
216
- image_moderation_result = gr.Textbox(label="Image Moderation Result")
217
- moderate_image_button.click(moderate_image, uploaded_image, image_moderation_result)
218
-
219
- with gr.TabItem("NSFW Classification"):
220
- selected_image = gr.Image(type="pil", label="Upload Image for NSFW Classification")
221
  classify_button = gr.Button("Classify Image")
222
  classification_result = gr.Textbox(label="Classification Result")
223
  classify_button.click(classify_nsfw, selected_image, classification_result)
 
211
  generate_image_button.click(generate_image, image_prompt, generated_image)
212
 
213
  with gr.TabItem("Moderate Image"):
214
+ selected_image = gr.Image(type="pil", label="Upload Image for Moderation")
 
 
 
 
 
 
215
  classify_button = gr.Button("Classify Image")
216
  classification_result = gr.Textbox(label="Classification Result")
217
  classify_button.click(classify_nsfw, selected_image, classification_result)