fix: remove gated models (Anwarkh1/Skin_Cancer, Marqo/nsfw)
Browse files
app.py
CHANGED
|
@@ -7,11 +7,9 @@ from huggingface_hub import login
|
|
| 7 |
MIN_ACEPTABLE_SCORE = 0.1
|
| 8 |
MAX_N_LABELS = 5
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
except FileNotFoundError:
|
| 14 |
-
pass
|
| 15 |
if HF_TOKEN:
|
| 16 |
login(token=HF_TOKEN)
|
| 17 |
|
|
@@ -37,7 +35,6 @@ MODELS = [
|
|
| 37 |
|
| 38 |
("Falconsai/nsfw_image_detection", "NSFW Detection"),
|
| 39 |
("carbon225/vit-base-patch16-224-hentai", "NSFW Detection"),
|
| 40 |
-
("Marqo/nsfw-image-detection-384", "NSFW Detection"),
|
| 41 |
|
| 42 |
("cafeai/cafe_aesthetic", "Aesthetic/Art Classification"),
|
| 43 |
|
|
@@ -45,8 +42,6 @@ MODELS = [
|
|
| 45 |
("RickyIG/emotion_face_image_classification", "Face/Emotion Classification"),
|
| 46 |
("rizvandwiki/gender-classification", "Face/Emotion Classification"),
|
| 47 |
|
| 48 |
-
("Anwarkh1/Skin_Cancer-Image_Classification", "Medical/Dermatology"),
|
| 49 |
-
|
| 50 |
("Ateeqq/ai-vs-human-image-detector", "AI vs Human Detection"),
|
| 51 |
("umm-maybe/AI-image-detector", "AI vs Human Detection"),
|
| 52 |
|
|
|
|
| 7 |
MIN_ACEPTABLE_SCORE = 0.1
|
| 8 |
MAX_N_LABELS = 5
|
| 9 |
|
| 10 |
+
import os
|
| 11 |
+
|
| 12 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
|
|
|
|
|
|
| 13 |
if HF_TOKEN:
|
| 14 |
login(token=HF_TOKEN)
|
| 15 |
|
|
|
|
| 35 |
|
| 36 |
("Falconsai/nsfw_image_detection", "NSFW Detection"),
|
| 37 |
("carbon225/vit-base-patch16-224-hentai", "NSFW Detection"),
|
|
|
|
| 38 |
|
| 39 |
("cafeai/cafe_aesthetic", "Aesthetic/Art Classification"),
|
| 40 |
|
|
|
|
| 42 |
("RickyIG/emotion_face_image_classification", "Face/Emotion Classification"),
|
| 43 |
("rizvandwiki/gender-classification", "Face/Emotion Classification"),
|
| 44 |
|
|
|
|
|
|
|
| 45 |
("Ateeqq/ai-vs-human-image-detector", "AI vs Human Detection"),
|
| 46 |
("umm-maybe/AI-image-detector", "AI vs Human Detection"),
|
| 47 |
|