From 4195dc91da2082bc91ccd759e94f4192ce0b5c11 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Mon, 25 Apr 2022 20:11:02 +0200 Subject: [PATCH] Rename image.bin -> image-idx3-ubyte --- src/webserver/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webserver/app.py b/src/webserver/app.py index c4f66ec..a682535 100644 --- a/src/webserver/app.py +++ b/src/webserver/app.py @@ -34,14 +34,14 @@ def post_json_handler(): def recognize_mnist(image): """Appelle le programme C reconnaissant les images""" # Créer le fichier binaire - write_image_to_binary(image, ".cache/image.bin") + write_image_to_binary(image, ".cache/image-idx3-ubyte") try: output = subprocess.check_output([ 'out/main', 'recognize', '--modele', '.cache/reseau.bin', - '--in', '.cache/image.bin', + '--in', '.cache/image-idx3-ubyte', '--out', 'json' ]).decode("utf-8") json_data = json.loads(output.replace("nan", "0.0"))["0"]