Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import os
|
2 |
import cv2
|
|
|
3 |
import base64
|
|
|
4 |
import numpy as np
|
5 |
import insightface
|
6 |
import onnxruntime
|
@@ -71,7 +73,7 @@ def load_face_swapper_model(path="./assets/pretrained_models/inswapper_128.onnx"
|
|
71 |
def load_face_parser_model(path="./assets/pretrained_models/79999_iter.pth"):
|
72 |
global FACE_PARSER
|
73 |
if FACE_PARSER is None:
|
74 |
-
FACE_PARSER = init_parsing_model(path, device=
|
75 |
|
76 |
# Загрузка всех моделей
|
77 |
load_face_analyser_model()
|
|
|
1 |
import os
|
2 |
import cv2
|
3 |
+
import torch
|
4 |
import base64
|
5 |
+
import argparse
|
6 |
import numpy as np
|
7 |
import insightface
|
8 |
import onnxruntime
|
|
|
73 |
def load_face_parser_model(path="./assets/pretrained_models/79999_iter.pth"):
|
74 |
global FACE_PARSER
|
75 |
if FACE_PARSER is None:
|
76 |
+
FACE_PARSER = init_parsing_model(path, device=device)
|
77 |
|
78 |
# Загрузка всех моделей
|
79 |
load_face_analyser_model()
|