feat: use constant for output dir of the prediction
Browse files
app.py
CHANGED
|
@@ -79,9 +79,7 @@ def interface_fn(
|
|
| 79 |
]
|
| 80 |
bear_id = bear_ids[0]
|
| 81 |
|
| 82 |
-
output_filepath =
|
| 83 |
-
f"./data/07_model_output/predict/prediction_{uuid.uuid4()}.png"
|
| 84 |
-
)
|
| 85 |
output_filepath.parent.mkdir(parents=True, exist_ok=True)
|
| 86 |
if output_filepath.exists():
|
| 87 |
output_filepath.unlink()
|
|
@@ -145,6 +143,7 @@ DEFAULT_IMAGE_INDEX = 0
|
|
| 145 |
PARAM_K = 5
|
| 146 |
PARAM_N_SAMPLES_PER_INDIVIDUAL = 4
|
| 147 |
PARAM_SQUARE_DIM = 300
|
|
|
|
| 148 |
|
| 149 |
with gr.Blocks() as demo:
|
| 150 |
loaded_models = load_models(
|
|
|
|
| 79 |
]
|
| 80 |
bear_id = bear_ids[0]
|
| 81 |
|
| 82 |
+
output_filepath = OUTPUT_DIR_PREDICTION / f"prediction_{uuid.uuid4()}.png"
|
|
|
|
|
|
|
| 83 |
output_filepath.parent.mkdir(parents=True, exist_ok=True)
|
| 84 |
if output_filepath.exists():
|
| 85 |
output_filepath.unlink()
|
|
|
|
| 143 |
PARAM_K = 5
|
| 144 |
PARAM_N_SAMPLES_PER_INDIVIDUAL = 4
|
| 145 |
PARAM_SQUARE_DIM = 300
|
| 146 |
+
OUTPUT_DIR_PREDICTION = Path("./data/07_model_output/predict/")
|
| 147 |
|
| 148 |
with gr.Blocks() as demo:
|
| 149 |
loaded_models = load_models(
|