Skip to content

Commit

Permalink
修复数据解析错误bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikaros-521 committed Apr 9, 2024
1 parent f01032e commit 1206fd5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def get_video(type: str, audio_path: str):
config.get("sadtalker", "pose_style"), # float (numeric value between 0 and 46) in 'Pose style' Slider component
api_name="/test"
)

logging.info(f'合成成功,生成在:{result["video"]}')

return result["video"]
else:
result = client.predict(
config.get("sadtalker", "img_file"), # filepath in 'Source image' Image component
Expand All @@ -76,9 +80,9 @@ def get_video(type: str, audio_path: str):
fn_index=1
)

logging.info(f'合成成功,生成在:{result["video"]}')
logging.info(f'合成成功,生成在:{result}')

return result["video"]
return result
elif type == "genefaceplusplus":
client = Client(config.get("genefaceplusplus", "api_ip_port"))
result = client.predict(
Expand Down
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"img_file": "E:\\GitHub_pro\\digital_human_video_player\\static\\imgs\\2.png",
"preprocess": "crop",
"still_mode": false,
"GFPGAN": true,
"batch_size": 4,
"GFPGAN": false,
"batch_size": 2,
"face_model_resolution": 256,
"pose_style": 0
},
Expand Down
2 changes: 1 addition & 1 deletion tests/sadtalker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# api_name="/test"
# )

client = Client("https://u373179-884c-4835511a.westc.gpuhub.com:8443/")
client = Client("https://--.westc.gpuhub.com:8443/")
result = client.predict(
"C:\\Users\\Administrator\\Pictures\\test\\1.png", # filepath in 'Source image' Image component
"C:\\Users\\Administrator\\Pictures\\test\\2.mp3", # filepath in 'Input audio' Audio component
Expand Down

0 comments on commit 1206fd5

Please sign in to comment.