From 58d255fc38ef1818c5f458da12643f86b097a9a2 Mon Sep 17 00:00:00 2001 From: tern19 Date: Mon, 11 Dec 2023 18:17:18 +0100 Subject: [PATCH] update app.py --- src/web/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/app.py b/src/web/app.py index d70b7e8..cd609c5 100644 --- a/src/web/app.py +++ b/src/web/app.py @@ -55,7 +55,8 @@ def upload_file(): #print("The received argument variable is: ", adress) # MD change : (Pau instructions added) - command = 'curl -X POST -H "Content-Type: multipart/form-data" -H "Accept: application/json" -F "beans_img=@{}" host.docker.internal:443/make_prediction'.format(file_path.replace("\\", "\\\\")) + #command = 'curl -X POST -H "Content-Type: multipart/form-data" -H "Accept: application/json" -F "beans_img=@{}" host.docker.internal:443/make_prediction'.format(file_path.replace("\\", "\\\\")) + command = f"curl -X POST -H 'Content-Type: multipart/form-data' -H 'Accept: application/json' -F 'beans_img=@{file_path}' http://{adress}:440/make_prediction" app.logger.info(command) # Get the classification result