LapStore commited on
Commit ·
14110f9
1
Parent(s): 51a8240
make better error handling
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ async def read_items(request: Request, type_of_filters: str = Form(...)):
|
|
| 56 |
|
| 57 |
|
| 58 |
@app.post('/imageStep1')
|
| 59 |
-
@limiter.limit("
|
| 60 |
async def image_step1(request: Request,image_file: UploadFile = File(...),background_image: Optional [UploadFile] = File(None),type_of_filters: str = Form(...), blur_radius: str = Form(...)):
|
| 61 |
#return {"type ":type_of_filters ,"radius":blur_radius,"image":image_file,"back":background_image}
|
| 62 |
#type_of_filters : cam / ...remove / ...back
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
@app.post('/imageStep1')
|
| 59 |
+
@limiter.limit("3/hour") # must have parameter request
|
| 60 |
async def image_step1(request: Request,image_file: UploadFile = File(...),background_image: Optional [UploadFile] = File(None),type_of_filters: str = Form(...), blur_radius: str = Form(...)):
|
| 61 |
#return {"type ":type_of_filters ,"radius":blur_radius,"image":image_file,"back":background_image}
|
| 62 |
#type_of_filters : cam / ...remove / ...back
|