Spaces:
Build error
Build error
Update samv3.py
Browse files
samv3.py
CHANGED
|
@@ -163,9 +163,9 @@ def generate_obstacle_overlay(image: Image.Image, rooftop_mask: np.ndarray):
|
|
| 163 |
# -------------------------------
|
| 164 |
|
| 165 |
@app.post("/process/")
|
| 166 |
-
async def process_image_endpoint(
|
| 167 |
image = Image.open(
|
| 168 |
-
io.BytesIO(await
|
| 169 |
).convert("RGB")
|
| 170 |
|
| 171 |
rooftop_mask = generate_rooftop_mask(image)
|
|
|
|
| 163 |
# -------------------------------
|
| 164 |
|
| 165 |
@app.post("/process/")
|
| 166 |
+
async def process_image_endpoint(file: UploadFile = File(...)):
|
| 167 |
image = Image.open(
|
| 168 |
+
io.BytesIO(await file.read())
|
| 169 |
).convert("RGB")
|
| 170 |
|
| 171 |
rooftop_mask = generate_rooftop_mask(image)
|