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:
1 parent
eb1217f3ac
commit
cee5959c74
2 files changed
+37
-44
No files matched your search
@@ -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"):
|
||||
|
||||
Reference in new issue
Block a user