LapStore commited on
Commit ·
1373e60
1
Parent(s): 7c14c4a
modified back image STEP 2
Browse files
app.py
CHANGED
|
@@ -22,11 +22,13 @@ def main():
|
|
| 22 |
return "Hello From Background remover !"
|
| 23 |
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
@app.post('/imageStep1')
|
| 28 |
-
async def image_step1(image_file: UploadFile = File(...),background_image: Optional [UploadFile] = File(None),type_of_filters: str = Form(...), blur_radius: str = Form(...))
|
| 29 |
-
|
| 30 |
input_to_type_of_filters=None
|
| 31 |
|
| 32 |
if background_image and background_image.filename:
|
|
@@ -64,7 +66,7 @@ async def image_step1(image_file: UploadFile = File(...),background_image: Optio
|
|
| 64 |
|
| 65 |
@app.post('/imageStep2')
|
| 66 |
async def image_step2(image_file: UploadFile = File(...),background_image: Optional [UploadFile] = File(None),type_of_filters: str = Form(...),
|
| 67 |
-
things_replace: str = Form(...), blur_radius: str = Form(...))
|
| 68 |
|
| 69 |
things_replace=ast.literal_eval(things_replace)
|
| 70 |
blur_radius=int(blur_radius)
|
|
|
|
| 22 |
return "Hello From Background remover !"
|
| 23 |
|
| 24 |
|
| 25 |
+
@app.post('/imageStep1')
|
| 26 |
+
async def tmp_function(type_of_filters: str = Form(...), blur_radius: str = Form(...)):
|
| 27 |
+
return {"type of filters ":type_of_filters ,"blur radius+2" :int(blur_radius)+2}
|
| 28 |
|
| 29 |
|
| 30 |
@app.post('/imageStep1')
|
| 31 |
+
async def image_step1(image_file: UploadFile = File(...),background_image: Optional [UploadFile] = File(None),type_of_filters: str = Form(...), blur_radius: str = Form(...)):
|
|
|
|
| 32 |
input_to_type_of_filters=None
|
| 33 |
|
| 34 |
if background_image and background_image.filename:
|
|
|
|
| 66 |
|
| 67 |
@app.post('/imageStep2')
|
| 68 |
async def image_step2(image_file: UploadFile = File(...),background_image: Optional [UploadFile] = File(None),type_of_filters: str = Form(...),
|
| 69 |
+
things_replace: str = Form(...), blur_radius: str = Form(...)):
|
| 70 |
|
| 71 |
things_replace=ast.literal_eval(things_replace)
|
| 72 |
blur_radius=int(blur_radius)
|