Spaces:
Paused
Paused
Update api.py
Browse filesclean: change fixxing way to remove unnecessary back slash.
api.py
CHANGED
@@ -23,7 +23,7 @@ app.mount("/public", StaticFiles(directory="public", html=True), name="public")
|
|
23 |
def index() -> FileResponse:
|
24 |
return FileResponse(path="./view/index.html", media_type="text/html")
|
25 |
|
26 |
-
@app.post("/prediction
|
27 |
async def predict(targetImage: UploadFile):
|
28 |
path = f'public/{targetImage.filename}'# api/filesディレクトリを作成しておく
|
29 |
with open(path, 'wb+') as buffer:
|
|
|
23 |
def index() -> FileResponse:
|
24 |
return FileResponse(path="./view/index.html", media_type="text/html")
|
25 |
|
26 |
+
@app.post("/prediction")
|
27 |
async def predict(targetImage: UploadFile):
|
28 |
path = f'public/{targetImage.filename}'# api/filesディレクトリを作成しておく
|
29 |
with open(path, 'wb+') as buffer:
|