Spaces:
Running
Running
fix model handling
Browse files- app.py +8 -5
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -8,6 +8,7 @@ import gradio as gr
|
|
| 8 |
|
| 9 |
from transformers.utils import logging
|
| 10 |
from transformers import set_seed
|
|
|
|
| 11 |
from model import VibeVoiceDemo
|
| 12 |
|
| 13 |
logging.set_verbosity_info()
|
|
@@ -16,6 +17,8 @@ logger = logging.get_logger(__name__)
|
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
|
|
|
| 19 |
def create_demo_interface(demo_instance: VibeVoiceDemo):
|
| 20 |
"""Create the Gradio interface with streaming support."""
|
| 21 |
|
|
@@ -574,7 +577,7 @@ def parse_args():
|
|
| 574 |
parser.add_argument(
|
| 575 |
"--model_path",
|
| 576 |
type=str,
|
| 577 |
-
default="
|
| 578 |
help="Path to the VibeVoice model directory",
|
| 579 |
)
|
| 580 |
parser.add_argument(
|
|
@@ -641,11 +644,11 @@ def main():
|
|
| 641 |
max_size=20, # Maximum queue size
|
| 642 |
default_concurrency_limit=1 # Process one request at a time
|
| 643 |
).launch(
|
| 644 |
-
share=args.share,
|
| 645 |
-
#
|
| 646 |
-
server_name="0.0.0.0" if args.share else "127.0.0.1",
|
|
|
|
| 647 |
show_error=True,
|
| 648 |
-
show_api=False # Hide API docs for cleaner interface
|
| 649 |
)
|
| 650 |
except KeyboardInterrupt:
|
| 651 |
print("\n🛑 Shutting down gracefully...")
|
|
|
|
| 8 |
|
| 9 |
from transformers.utils import logging
|
| 10 |
from transformers import set_seed
|
| 11 |
+
from huggingface_hub import snapshot_download
|
| 12 |
from model import VibeVoiceDemo
|
| 13 |
|
| 14 |
logging.set_verbosity_info()
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
+
snapshot_download(repo_id="microsoft/VibeVoice-1.5B", local_dir="./ckpts/vibevoice")
|
| 21 |
+
|
| 22 |
def create_demo_interface(demo_instance: VibeVoiceDemo):
|
| 23 |
"""Create the Gradio interface with streaming support."""
|
| 24 |
|
|
|
|
| 577 |
parser.add_argument(
|
| 578 |
"--model_path",
|
| 579 |
type=str,
|
| 580 |
+
default="./ckpts/vibevoice",
|
| 581 |
help="Path to the VibeVoice model directory",
|
| 582 |
)
|
| 583 |
parser.add_argument(
|
|
|
|
| 644 |
max_size=20, # Maximum queue size
|
| 645 |
default_concurrency_limit=1 # Process one request at a time
|
| 646 |
).launch(
|
| 647 |
+
#share= args.share,
|
| 648 |
+
#server_port=args.port,
|
| 649 |
+
#server_name="0.0.0.0" if args.share else "127.0.0.1",
|
| 650 |
+
show_api=False, # Hide API docs for cleaner interface
|
| 651 |
show_error=True,
|
|
|
|
| 652 |
)
|
| 653 |
except KeyboardInterrupt:
|
| 654 |
print("\n🛑 Shutting down gracefully...")
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
git+https://github.com/vibevoice-community/VibeVoice
|
| 2 |
soundfile
|
|
|
|
|
|
| 1 |
git+https://github.com/vibevoice-community/VibeVoice
|
| 2 |
soundfile
|
| 3 |
+
huggingface_hub
|