Download api/app/settings.py from iBrokeTheCode/Image_Classifier_with_CNN: direct link, hf CLI and curl.
- Browser
- Download file 817 Bytes
-
https://huggingface.co/spaces/iBrokeTheCode/Image_Classifier_with_CNN/resolve/3ce4bfcd092cc1d5f518baf6ca367ffa336d7d75/api/app/settings.py
- Command line
-
hf download hf://spaces/iBrokeTheCode/Image_Classifier_with_CNN@3ce4bfcd092cc1d5f518baf6ca367ffa336d7d75/api/app/settings.py
-
curl -L -o settings.py https://huggingface.co/spaces/iBrokeTheCode/Image_Classifier_with_CNN/resolve/3ce4bfcd092cc1d5f518baf6ca367ffa336d7d75/api/app/settings.py
817 Bytes
| import os | |
| import dotenv | |
| # Load environment variables from .env file | |
| dotenv.load_dotenv() | |
| # Run API in Debug mode | |
| API_DEBUG = True | |
| # We will store images uploaded by the user on this folder | |
| UPLOAD_FOLDER = "uploads/" | |
| os.makedirs(UPLOAD_FOLDER, exist_ok=True) | |
| # REDIS settings | |
| # Queue name | |
| REDIS_QUEUE = "service_queue" | |
| # Port | |
| REDIS_PORT = 6379 | |
| # DB Id | |
| REDIS_DB_ID = 0 | |
| # Host IP | |
| REDIS_IP = os.getenv("REDIS_IP", "redis") | |
| # Sleep parameters which manages the | |
| # interval between requests to our redis queue | |
| API_SLEEP = 0.05 | |
| # Database settings | |
| DATABASE_USERNAME = os.getenv("POSTGRES_USER") | |
| DATABASE_PASSWORD = os.getenv("POSTGRES_PASSWORD") | |
| DATABASE_HOST = os.getenv("DATABASE_HOST") | |
| DATABASE_NAME = os.getenv("POSTGRES_DB") | |
| SECRET_KEY = os.getenv("SECRET_KEY", "S09WWWHXBAJDIUEREHCN3752346572452VGGGVWWW526194") | |