Spaces:
Running
Running
File size: 3,260 Bytes
8cff4cb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # 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'}
|