Code refactor (#7923)

* Code refactor for general.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocherandpre-commit-ci[bot] authored and GitHub committed 2022-05-22 15:24:08 +02:00
1 parent eb1217f3ac
commit cee5959c74
2 files changed
+37 -44

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ DETECTION_URL = "/v1/object-detection/yolov5s"
@app.route(DETECTION_URL, methods=["POST"])
def predict():
if not request.method == "POST":
if request.method != "POST":
return
if request.files.get("image"):