Update main.py
Browse files
main.py
CHANGED
|
@@ -13,7 +13,7 @@ import os
|
|
| 13 |
app = FastAPI()
|
| 14 |
model = Model(device='cuda' if torch.cuda.is_available() else 'cpu')
|
| 15 |
|
| 16 |
-
@app.post("/upload")
|
| 17 |
async def upload_image(file: UploadFile = File(...), top: int = Form(...), bottom: int = Form(...), left: int = Form(...), right: int = Form(...)):
|
| 18 |
try:
|
| 19 |
with open("temp.jpg", "wb") as buffer:
|
|
|
|
| 13 |
app = FastAPI()
|
| 14 |
model = Model(device='cuda' if torch.cuda.is_available() else 'cpu')
|
| 15 |
|
| 16 |
+
@app.post("/upload/")
|
| 17 |
async def upload_image(file: UploadFile = File(...), top: int = Form(...), bottom: int = Form(...), left: int = Form(...), right: int = Form(...)):
|
| 18 |
try:
|
| 19 |
with open("temp.jpg", "wb") as buffer:
|