Spaces:
Sleeping
Sleeping
| import os | |
| import sys | |
| from detect import detect_face_shape | |
| # Add current dir to path logic if needed, but running from ai_service should be fine | |
| print("Starting simple verification...") | |
| DATASET_DIR = "../dataset" | |
| # Pick a file | |
| if os.path.exists(DATASET_DIR): | |
| heart_dir = os.path.join(DATASET_DIR, "heart") | |
| if os.path.exists(heart_dir): | |
| files = os.listdir(heart_dir) | |
| if files: | |
| img_path = os.path.join(heart_dir, files[0]) | |
| print(f"Testing {img_path}") | |
| try: | |
| result = detect_face_shape(img_path) | |
| print(f"Result: {result}") | |
| except Exception as e: | |
| print(f"Error: {e}") | |
| else: | |
| print("No files in heart dir") | |
| else: | |
| print("No heart dir") | |
| else: | |
| print("No dataset dir") | |