Spaces:
Sleeping
Sleeping
File size: 982 Bytes
127130c 684641d 127130c 15d2398 127130c 1186c36 127130c |
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 |
"All the constants used in this repo."
from pathlib import Path
# This repository's directory
REPO_DIR = Path(__file__).parent
CURRENT_DIR = Path(__file__).parent
DEPLOYMENT_DIR = CURRENT_DIR / "deployment_files"
# This repository's main necessary folders
SEIZURE_DETECTION_MODEL_PATH = REPO_DIR / "deployment_files"
KEYS_PATH = REPO_DIR / ".fhe_keys"
CLIENT_TMP_PATH = REPO_DIR / "client_tmp"
SERVER_TMP_PATH = REPO_DIR / "server_tmp"
# Create the necessary folders
KEYS_PATH.mkdir(exist_ok=True)
CLIENT_TMP_PATH.mkdir(exist_ok=True)
SERVER_TMP_PATH.mkdir(exist_ok=True)
# The input images' shape. Images with different input shapes will be cropped and resized by Gradio
INPUT_SHAPE = (1, 1, 32, 32)
# Retrieve the input examples directory
INPUT_EXAMPLES_DIR = REPO_DIR / "input_examples"
# List of all image examples suggested in the demo
EXAMPLES = [str(image) for image in INPUT_EXAMPLES_DIR.glob("**/*")]
# Store the server's URL
SERVER_URL = "http://localhost:8000/"
|