Spaces:
Sleeping
Sleeping
imabackstabber
commited on
Commit
·
acaee57
1
Parent(s):
ddcdb07
test frontend
Browse files
app.py
CHANGED
@@ -27,7 +27,8 @@ os.makedirs(OUT_FOLDER, exist_ok=True)
|
|
27 |
# from main.inference import Inferer
|
28 |
# inferer = Inferer(DEFAULT_MODEL, num_gpus, OUT_FOLDER)
|
29 |
|
30 |
-
state_cnt =
|
|
|
31 |
|
32 |
@spaces.GPU(enable_queue=True)
|
33 |
def infer(image_input, in_threshold=0.5, num_people="Single person", render_mesh=False):
|
@@ -75,8 +76,8 @@ def infer(image_input, in_threshold=0.5, num_people="Single person", render_mesh
|
|
75 |
# os.system(f'zip -r {save_mesh_file} {save_path_mesh}')
|
76 |
# os.system(f'zip -r {save_smplx_file} {save_path_smplx}')
|
77 |
# yield img, video_path, save_mesh_file, save_smplx_file
|
78 |
-
state_cnt += 1
|
79 |
-
return image_input, "success {}".format(state_cnt)
|
80 |
|
81 |
TITLE = '''<h1 align="center">PostoMETRO: Pose Token Enhanced Mesh Transformer for Robust 3D Human Mesh Recovery</h1>'''
|
82 |
DESCRIPTION = '''
|
|
|
27 |
# from main.inference import Inferer
|
28 |
# inferer = Inferer(DEFAULT_MODEL, num_gpus, OUT_FOLDER)
|
29 |
|
30 |
+
state_cnt = {}
|
31 |
+
state_cnt['k'] = 0
|
32 |
|
33 |
@spaces.GPU(enable_queue=True)
|
34 |
def infer(image_input, in_threshold=0.5, num_people="Single person", render_mesh=False):
|
|
|
76 |
# os.system(f'zip -r {save_mesh_file} {save_path_mesh}')
|
77 |
# os.system(f'zip -r {save_smplx_file} {save_path_smplx}')
|
78 |
# yield img, video_path, save_mesh_file, save_smplx_file
|
79 |
+
state_cnt['k'] += 1
|
80 |
+
return image_input, "success {}".format(state_cnt['k'])
|
81 |
|
82 |
TITLE = '''<h1 align="center">PostoMETRO: Pose Token Enhanced Mesh Transformer for Robust 3D Human Mesh Recovery</h1>'''
|
83 |
DESCRIPTION = '''
|