Spaces:
Running
Running
Update app.py
#1
by
Hashii1729
- opened
app.py
CHANGED
@@ -41,6 +41,7 @@ class SegmentationRequest(BaseModel):
|
|
41 |
"quality": "high",
|
42 |
"outline": "grey_2px"
|
43 |
}
|
|
|
44 |
image_url="https://res.cloudinary.com/dyvuvklpk/image/upload/v1750955465/samples/man-portrait.jpg"
|
45 |
|
46 |
print(image_url)
|
@@ -349,7 +350,16 @@ async def startup_event():
|
|
349 |
|
350 |
@app.get("/")
|
351 |
async def root():
|
352 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
|
354 |
@app.get("/health")
|
355 |
async def health_check():
|
|
|
41 |
"quality": "high",
|
42 |
"outline": "grey_2px"
|
43 |
}
|
44 |
+
|
45 |
image_url="https://res.cloudinary.com/dyvuvklpk/image/upload/v1750955465/samples/man-portrait.jpg"
|
46 |
|
47 |
print(image_url)
|
|
|
350 |
|
351 |
@app.get("/")
|
352 |
async def root():
|
353 |
+
SegmentationRequest request = {image_url: HttpUrl
|
354 |
+
settings: Optional[Dict] = {
|
355 |
+
"padding": 15,
|
356 |
+
"background": "white",
|
357 |
+
"quality": "high",
|
358 |
+
"outline": "grey_2px"
|
359 |
+
}
|
360 |
+
}
|
361 |
+
segment_fashion_items(request)
|
362 |
+
return {"message": "Successfully Finished Execution!", "version": "1.0.0"}
|
363 |
|
364 |
@app.get("/health")
|
365 |
async def health_check():
|