Spaces:
Sleeping
Sleeping
tesalonikahtp commited on
Commit ·
ac87360
1
Parent(s): 8ee96ec
fix resolve req
Browse files
app/util/passport_photo_engine/segmenter_rmbg.py
CHANGED
|
@@ -2,6 +2,7 @@ import torch
|
|
| 2 |
import torch.nn.functional as F
|
| 3 |
from torchvision.transforms.functional import normalize
|
| 4 |
from transformers import AutoModelForImageSegmentation
|
|
|
|
| 5 |
|
| 6 |
class SegmenterRMBG:
|
| 7 |
def __init__(self, device=None, model_input_size=(1024,1024)):
|
|
|
|
| 2 |
import torch.nn.functional as F
|
| 3 |
from torchvision.transforms.functional import normalize
|
| 4 |
from transformers import AutoModelForImageSegmentation
|
| 5 |
+
import numpy as np
|
| 6 |
|
| 7 |
class SegmenterRMBG:
|
| 8 |
def __init__(self, device=None, model_input_size=(1024,1024)):
|
server.py
CHANGED
|
@@ -14,7 +14,7 @@ import uuid
|
|
| 14 |
import importlib
|
| 15 |
import io
|
| 16 |
from flask import Flask, request, jsonify, send_file
|
| 17 |
-
|
| 18 |
|
| 19 |
from app.util.gen_ai_base import GenAIBaseClient
|
| 20 |
from app.util.browser_agent import BrowserAgent
|
|
|
|
| 14 |
import importlib
|
| 15 |
import io
|
| 16 |
from flask import Flask, request, jsonify, send_file
|
| 17 |
+
import numpy as np
|
| 18 |
|
| 19 |
from app.util.gen_ai_base import GenAIBaseClient
|
| 20 |
from app.util.browser_agent import BrowserAgent
|