Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,13 +27,17 @@ def predict(image):
|
|
27 |
# Gradio Interface
|
28 |
def main():
|
29 |
description = "NSFW Image Detection using SigLIP2 Safety Classifier"
|
|
|
|
|
|
|
|
|
30 |
iface = gr.Interface(
|
31 |
fn=predict,
|
32 |
inputs=gr.Image(type="numpy", label="Upload Image"),
|
33 |
outputs=gr.Label(num_top_classes=3, label="Predictions"),
|
34 |
title="NSFW Image Detector",
|
35 |
description=description,
|
36 |
-
|
37 |
allow_flagging="never"
|
38 |
)
|
39 |
iface.launch()
|
|
|
27 |
# Gradio Interface
|
28 |
def main():
|
29 |
description = "NSFW Image Detection using SigLIP2 Safety Classifier"
|
30 |
+
|
31 |
+
model_card_link = "[🧠 View Model on Hugging Face](https://huggingface.co/Ateeqq/nsfw-image-detection)"
|
32 |
+
article_link = "[📖 Read Training Article](https://exnrt.com/blog/ai/fine-tuning-siglip2/)"
|
33 |
+
|
34 |
iface = gr.Interface(
|
35 |
fn=predict,
|
36 |
inputs=gr.Image(type="numpy", label="Upload Image"),
|
37 |
outputs=gr.Label(num_top_classes=3, label="Predictions"),
|
38 |
title="NSFW Image Detector",
|
39 |
description=description,
|
40 |
+
article=f"{model_card_link}<br>{article_link}",
|
41 |
allow_flagging="never"
|
42 |
)
|
43 |
iface.launch()
|