mobileapp / config.py
gcrn2318
Initial backend deploy
3f0cbe8
Raw
History Blame Contribute Delete
803 Bytes
# config.py
import torch
import os
# Determine the device to use (CPU or GPU if available)
DEVICE = "cpu"
# Path to your trained classification model
# Make sure 'my_crime_scene_classifier.joblib' and 'label_encoder.joblib'
# are in the same directory as your main.py and CrimeSceneAnalyzer.py
MODEL_SAVE_PATH = "saved_model.joblib"
LABEL_ENCODER_PATH = "label_encoder.joblib" # <--- THIS LINE IS CRUCIAL!
# Ensure the model files exist (optional, but good for debugging)
#if not os.path.exists(MODEL_SAVE_PATH):
# print(f"WARNING: Model file not found at {MODEL_SAVE_PATH}. Scene type prediction will be 'Undetermined'.")
if not os.path.exists(LABEL_ENCODER_PATH):
print(f"WARNING: Label encoder file not found at {LABEL_ENCODER_PATH}. Scene type prediction might be raw or 'Undetermined'.")