Spaces:
Running
Running
Download config/settings.py from RabiHmedtak/API_RapidAPI_test: direct link, hf CLI and curl.
- Browser
- Download file 3.26 kB
-
https://huggingface.co/spaces/RabiHmedtak/API_RapidAPI_test/resolve/main/config/settings.py
- Command line
-
hf download hf://spaces/RabiHmedtak/API_RapidAPI_test/config/settings.py
-
curl -L -o settings.py https://huggingface.co/spaces/RabiHmedtak/API_RapidAPI_test/resolve/main/config/settings.py
3.26 kB
| # config/settings.py | |
| # ββ Paths ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| MODEL_PATH = 'model_moncef.pt' | |
| SKIN_TYPE_MODEL_PATH = 'skin_type_classification85.pth' | |
| # ββ Limits βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| MAX_IMAGE_SIZE = 640 # Reduced from 1024 β YOLO works great at 640 | |
| MAX_FILE_SIZE = 10 * 1024 * 1024 # 10 MB | |
| # ββ Timeouts (seconds) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| GROQ_TIMEOUT = 4.0 # Fail fast, return default sooner | |
| REQUEST_TIMEOUT = 30.0 | |
| # ββ Groq βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| GROQ_MODEL = "llama-3.1-8b-instant" # Much faster than 70b | |
| # ββ Analysis response cache ββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| MAX_CACHE_SIZE = 100 | |
| # ββ Translation: YOLO class β display name ββββββββββββββββββββββββββββββββββββ | |
| CLASS_TRANSLATIONS_EN = { | |
| 'acne': 'Acne', 'blackheads': 'Blackheads', 'dark circles': 'Dark Circles', | |
| 'dark spot': 'Dark Spot', 'eyebags': 'Eye Bags', 'redness': 'Redness', | |
| 'whiteheads': 'Whiteheads', 'wrinkles': 'Wrinkles', 'Acne': 'Acne', | |
| 'Acne Scar': 'Acne Scar', 'Blackhead': 'Blackhead', 'Dark Circles': 'Dark Circles', | |
| 'Dark Spots': 'Dark Spots', 'Enlarged Pores': 'Enlarged Pores', 'Eyebags': 'Eye Bags', | |
| 'Freckle': 'Freckle', 'Melasma': 'Melasma', 'Nodules': 'Nodules', | |
| 'Papules': 'Papules', 'Pustules': 'Pustules', 'Skin Redness': 'Skin Redness', | |
| 'Sun Spots': 'Sun Spots', 'Vascular': 'Vascular Lesions', 'Whitehead': 'Whitehead', | |
| 'Wrinkles': 'Wrinkles', | |
| } | |
| CLASS_TRANSLATIONS_FR = { | |
| 'acne': 'AcnΓ©', 'blackheads': 'Points noirs', 'dark circles': 'Cernes', | |
| 'dark spot': 'Tache brune', 'eyebags': 'Poches sous les yeux', 'redness': 'Rougeurs', | |
| 'whiteheads': 'Points blancs', 'wrinkles': 'Rides', 'Acne': 'AcnΓ©', | |
| 'Acne Scar': "Cicatrice d'acnΓ©", 'Blackhead': 'Point noir', 'Dark Circles': 'Cernes', | |
| 'Dark Spots': 'Taches brunes', 'Enlarged Pores': 'Pores dilatΓ©s', | |
| 'Eyebags': 'Poches sous les yeux', 'Freckle': 'Tache de rousseur', | |
| 'Melasma': 'MΓ©lasma', 'Nodules': 'Nodules', 'Papules': 'Papules', | |
| 'Pustules': 'Pustules', 'Skin Redness': 'Rougeurs', 'Sun Spots': 'Taches solaires', | |
| 'Vascular': 'LΓ©sions vasculaires', 'Whitehead': 'Point blanc', 'Wrinkles': 'Rides', | |
| } | |
| SKIN_TYPE_CLASSES_EN = {0: 'Dry Skin', 1: 'Normal Skin', 2: 'Oily Skin'} | |
| SKIN_TYPE_CLASSES_FR = {0: 'Peau sèche', 1: 'Peau normale', 2: 'Peau grasse'} | |