Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- app.py +5 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -11,7 +11,7 @@ import torch
|
|
| 11 |
import numpy as np # 确保导入 numpy
|
| 12 |
import random # 确保导入 random
|
| 13 |
import s3tokenizer
|
| 14 |
-
|
| 15 |
from soulxpodcast.models.soulxpodcast import SoulXPodcast
|
| 16 |
from soulxpodcast.config import Config, SoulXPodcastLLMConfig, SamplingParams
|
| 17 |
from soulxpodcast.utils.dataloader import (
|
|
@@ -512,6 +512,10 @@ def render_interface() -> gr.Blocks:
|
|
| 512 |
return page
|
| 513 |
|
| 514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 515 |
# ================================================
|
| 516 |
# Options
|
| 517 |
# ================================================
|
|
|
|
| 11 |
import numpy as np # 确保导入 numpy
|
| 12 |
import random # 确保导入 random
|
| 13 |
import s3tokenizer
|
| 14 |
+
from huggingface_hub import hf_hub_download
|
| 15 |
from soulxpodcast.models.soulxpodcast import SoulXPodcast
|
| 16 |
from soulxpodcast.config import Config, SoulXPodcastLLMConfig, SamplingParams
|
| 17 |
from soulxpodcast.utils.dataloader import (
|
|
|
|
| 512 |
return page
|
| 513 |
|
| 514 |
|
| 515 |
+
def prepare_model():
|
| 516 |
+
ckpt_path = hf_hub_download(repo_id="Soul-AILab/SoulX-Podcast-1.7B")
|
| 517 |
+
return ckpt_path
|
| 518 |
+
|
| 519 |
# ================================================
|
| 520 |
# Options
|
| 521 |
# ================================================
|
requirements.txt
CHANGED
|
@@ -11,4 +11,5 @@ accelerate==1.10.1
|
|
| 11 |
onnxruntime
|
| 12 |
onnxruntime-gpu
|
| 13 |
einops
|
| 14 |
-
gradio
|
|
|
|
|
|
| 11 |
onnxruntime
|
| 12 |
onnxruntime-gpu
|
| 13 |
einops
|
| 14 |
+
gradio
|
| 15 |
+
huggingface_hub
|