Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,8 +6,11 @@ app = FastAPI()
|
|
| 6 |
|
| 7 |
# Create ONE session (cached in memory)
|
| 8 |
SESSION = new_session(
|
| 9 |
-
"
|
| 10 |
-
alpha_matting=True
|
|
|
|
|
|
|
|
|
|
| 11 |
)
|
| 12 |
|
| 13 |
@app.get("/")
|
|
|
|
| 6 |
|
| 7 |
# Create ONE session (cached in memory)
|
| 8 |
SESSION = new_session(
|
| 9 |
+
"u2net",
|
| 10 |
+
alpha_matting=True,
|
| 11 |
+
alpha_matting_foreground_threshold=240,
|
| 12 |
+
alpha_matting_background_threshold=10,
|
| 13 |
+
alpha_matting_erode_size=10,
|
| 14 |
)
|
| 15 |
|
| 16 |
@app.get("/")
|