Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions app_lam_audio2exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
except:
pass

import patoolib

h5_rendering = True


Expand Down Expand Up @@ -119,17 +121,21 @@ def parse_configs():


def create_zip_archive(output_zip='assets/arkitWithBSData.zip', base_dir=""):
import os
if (os.path.exists(output_zip)):
if os.path.exists(output_zip):
os.remove(output_zip)
print(f"Reomve previous file: {output_zip}")
run_command = 'zip -r '+output_zip+' '+base_dir
os.system(run_command)
# check file
if(os.path.exists(output_zip)):
print(f"Remove previous file: {output_zip}")

try:
# 创建压缩包
patoolib.create_archive(
archive=output_zip,
filenames=[base_dir], # 要压缩的目录
verbosity=-1, # 静默模式
program='zip' # 指定使用zip格式
)
print(f"Archive created successfully: {output_zip}")
else:
raise ValueError(f"Archive created failed: {output_zip}")
except Exception as e:
raise ValueError(f"Archive creation failed: {str(e)}")


def demo_lam_audio2exp(infer, cfg):
Expand Down Expand Up @@ -260,7 +266,7 @@ def core_fn(image_path: str, audio_params, working_dir):
)

demo.queue()
demo.launch()
demo.launch(inbrowser=True)



Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spleeter==2.4.2
#spleeter==2.4.0
opencv_python_headless==4.11.0.86
gradio==5.25.2
omegaconf==2.3.0
Expand All @@ -7,4 +7,5 @@ yapf==0.40.1
librosa==0.11.0
transformers==4.36.2
termcolor==3.0.1
numpy==1.26.3
numpy==1.26.3
patool