smjain's picture
Update app.py
c3f2d33 verified
raw
history blame
No virus
1.08 kB
import os
from huggingface_hub import login
# Example command to set an environment variable (this is not effective for parent Python processes)
token=os.environ['token']
access_token_read = token
login(token = access_token_read)
#os.environ['HUGGINGFACE_TOKEN'] = token
# This will not make HUGGINGFACE_TOKEN accessible in the Python script outside the os.system call.
os.system("aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d . -o hubert_base.pt")
os.system("aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt -d . -o rmvpe.pt")
os.system("aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/spaces/smjain/Advanced-RVC-Inference/resolve/main/trips.pth -d ./weights -o trips.pth")
os.system("aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/sail-rvc/yoimiya-jp/resolve/main/model.index -d ./weights/index -o yoimiya.index")
os.system("python infer.py")