weijiang2024
commited on
Upload folder using huggingface_hub
Browse files- app.py +0 -7
- requirements.txt +0 -0
- utils/operate_json.py +1 -2
- utils/utils.py +1 -4
app.py
CHANGED
@@ -1,17 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
#from algs.alg0.utils.utils import *
|
4 |
-
#from algs.alg0.eval_fashion_person import *
|
5 |
-
#from algs.alg0.name_entity_recognition import *
|
6 |
-
#from algs.alg0.utils.operate_json import *
|
7 |
-
|
8 |
-
from utils.utils import *
|
9 |
from eval_fashion_person import *
|
10 |
from name_entity_recognition import *
|
11 |
from utils.operate_json import *
|
12 |
|
13 |
|
14 |
-
|
15 |
def eval_image(input_image, progress=gr.Progress()):
|
16 |
if input_image is None:
|
17 |
raise gr.Error("未上传图片,请先上传图片")
|
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
from eval_fashion_person import *
|
4 |
from name_entity_recognition import *
|
5 |
from utils.operate_json import *
|
6 |
|
7 |
|
|
|
8 |
def eval_image(input_image, progress=gr.Progress()):
|
9 |
if input_image is None:
|
10 |
raise gr.Error("未上传图片,请先上传图片")
|
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|
utils/operate_json.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
import json
|
2 |
import os
|
3 |
|
4 |
-
from
|
5 |
-
from algs.alg0.utils.utils import *
|
6 |
|
7 |
|
8 |
# 将二维数组转化为JSON字符串
|
|
|
1 |
import json
|
2 |
import os
|
3 |
|
4 |
+
from utils import *
|
|
|
5 |
|
6 |
|
7 |
# 将二维数组转化为JSON字符串
|
utils/utils.py
CHANGED
@@ -2,11 +2,8 @@ import PIL.Image as Image
|
|
2 |
import io
|
3 |
from collections import Counter
|
4 |
|
5 |
-
|
6 |
-
#from algs.alg0.eval_fashion_person import *
|
7 |
|
8 |
-
from utils.mamasnowflake import *
|
9 |
-
from eval_fashion_person import *
|
10 |
|
11 |
# 根据两个点坐标截取人物画像图片
|
12 |
def get_one_person(xyxy,
|
|
|
2 |
import io
|
3 |
from collections import Counter
|
4 |
|
5 |
+
from mamasnowflake import *
|
|
|
6 |
|
|
|
|
|
7 |
|
8 |
# 根据两个点坐标截取人物画像图片
|
9 |
def get_one_person(xyxy,
|