Compare commits
2 Commits
a4ee17e17b
...
9982c06e06
Author | SHA1 | Date |
---|---|---|
Rumah | 9982c06e06 | |
Rumah | c731006110 |
|
@ -102,20 +102,7 @@ def load_models(whisper_backend_name, whisper_model_name, alignment_model_name,
|
|||
|
||||
encodec_fn = f"{MODELS_PATH}/encodec_4cb2048_giga.th"
|
||||
if not os.path.exists(encodec_fn):
|
||||
os.system(f"wget https://huggingface.co/pyp1/VoiceCraft/resolve/main/encodec_4cb2048_giga.th")
|
||||
|
||||
# Define the source and destination paths
|
||||
source_path = "/content/encodec_4cb2048_giga.th"
|
||||
destination_path = "/content/VoiceCraft-gradio-colab/pretrained_models/encodec_4cb2048_giga.th"
|
||||
|
||||
# Move or copy the file to the correct location
|
||||
try:
|
||||
shutil.move(source_path, destination_path) # Use shutil.move for moving
|
||||
print("File moved successfully.")
|
||||
except FileNotFoundError:
|
||||
print("File not found at the source path.")
|
||||
except shutil.Error as e:
|
||||
print("Error:", e)
|
||||
os.system(f"wget https://huggingface.co/pyp1/VoiceCraft/resolve/main/encodec_4cb2048_giga.th -O " + encodec_fn)
|
||||
|
||||
voicecraft_model = {
|
||||
"config": config,
|
||||
|
@ -625,4 +612,4 @@ if __name__ == "__main__":
|
|||
MODELS_PATH = args.models_path
|
||||
|
||||
app = get_app()
|
||||
app.queue().launch(share=args.share, server_port=args.port)
|
||||
app.queue().launch(share=args.share, server_name="0.0.0.0", server_port=args.port)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"colab_type": "text"
|
||||
},
|
||||
"source": [
|
||||
"<a href=\"https://colab.research.google.com/github/Sewlell/VoiceCraft-gradio-colab/blob/master/voicecraft_gradio_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
||||
"<a href=\"https://colab.research.google.com/github/Sewlell/VoiceCraft/blob/master/voicecraft_gradio_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!git clone https://github.com/Sewlell/VoiceCraft-gradio-colab.git"
|
||||
"!git clone https://github.com/Sewlell/VoiceCraft.git"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -44,7 +44,7 @@
|
|||
"\n",
|
||||
"!pip install -e git+https://github.com/facebookresearch/audiocraft.git@c5157b5bf14bf83449c17ea1eeb66c19fb4bc7f0#egg=audiocraft\n",
|
||||
"\n",
|
||||
"!pip install -r \"/content/VoiceCraft-gradio-colab/gradio_requirements.txt\"\n",
|
||||
"!pip install -r \"/content/VoiceCraft/gradio_requirements.txt\"\n",
|
||||
"\n",
|
||||
"!pip install typer==0.7.0"
|
||||
]
|
||||
|
@ -101,7 +101,7 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!python /content/VoiceCraft-gradio-colab/gradio_app.py --demo-path=/content/VoiceCraft-gradio-colab/demo --tmp-path=/content/VoiceCraft-gradio-colab/demo/temp --models-path=/content/VoiceCraft-gradio-colab/pretrained_models --share"
|
||||
"!python /content/VoiceCraft/gradio_app.py --demo-path=/content/VoiceCraft/demo --tmp-path=/content/VoiceCraft/demo/temp --models-path=/content/VoiceCraft/pretrained_models --share"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue