Spaces:
Sleeping
Sleeping
Pedro Sandoval commited on
Commit ·
ff050fc
1
Parent(s): e01c257
Add checkpoint with Git LFS
Browse files- .gitattributes +1 -0
- .gitignore +0 -3
- app.py +1 -1
- checkpoints/ckpt_025000_inference.pt +3 -0
- scripts/upload_checkpoint.py +0 -46
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
checkpoints/ckpt_025000_inference.pt filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
|
@@ -2,6 +2,3 @@ __pycache__/
|
|
| 2 |
*.py[cod]
|
| 3 |
.gradio/
|
| 4 |
.ipynb_checkpoints/
|
| 5 |
-
checkpoints/*.pt
|
| 6 |
-
checkpoints/*.pth
|
| 7 |
-
checkpoints/*.ckpt
|
|
|
|
| 2 |
*.py[cod]
|
| 3 |
.gradio/
|
| 4 |
.ipynb_checkpoints/
|
|
|
|
|
|
|
|
|
app.py
CHANGED
|
@@ -142,7 +142,7 @@ def synthesize(
|
|
| 142 |
with gr.Blocks(title="nanoTTS") as demo:
|
| 143 |
gr.Markdown(
|
| 144 |
"# nanoTTS\n"
|
| 145 |
-
"A minimal GPT-style text-to-speech model trained on LibriTTS
|
| 146 |
)
|
| 147 |
with gr.Row():
|
| 148 |
with gr.Column(scale=3):
|
|
|
|
| 142 |
with gr.Blocks(title="nanoTTS") as demo:
|
| 143 |
gr.Markdown(
|
| 144 |
"# nanoTTS\n"
|
| 145 |
+
"A minimal GPT-style text-to-speech model trained on LibriTTS. Code available at [psandovalsegura/nanoTTS](https://github.com/psandovalsegura/nanoTTS)."
|
| 146 |
)
|
| 147 |
with gr.Row():
|
| 148 |
with gr.Column(scale=3):
|
checkpoints/ckpt_025000_inference.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b672c6781c4f8812e984e1841df32c0648dbe712017c11f7240d31e5c81501f0
|
| 3 |
+
size 377600219
|
scripts/upload_checkpoint.py
DELETED
|
@@ -1,46 +0,0 @@
|
|
| 1 |
-
from __future__ import annotations
|
| 2 |
-
|
| 3 |
-
import argparse
|
| 4 |
-
import os
|
| 5 |
-
import sys
|
| 6 |
-
from pathlib import Path
|
| 7 |
-
|
| 8 |
-
from huggingface_hub import HfApi
|
| 9 |
-
from huggingface_hub.errors import HfHubHTTPError
|
| 10 |
-
|
| 11 |
-
DEFAULT_PATH = Path("checkpoints/ckpt_025000_inference.pt")
|
| 12 |
-
|
| 13 |
-
def main() -> None:
|
| 14 |
-
parser = argparse.ArgumentParser(description="Upload the nanoTTS inference checkpoint to the Space.")
|
| 15 |
-
parser.add_argument("--path", type=Path, default=DEFAULT_PATH)
|
| 16 |
-
parser.add_argument("--repo-id", default="psando/nanoTTS")
|
| 17 |
-
parser.add_argument("--path-in-repo", default=str(DEFAULT_PATH))
|
| 18 |
-
parser.add_argument("--commit-message", default="Upload nanoTTS inference checkpoint")
|
| 19 |
-
parser.add_argument("--token", default=os.environ.get("HF_TOKEN"))
|
| 20 |
-
args = parser.parse_args()
|
| 21 |
-
|
| 22 |
-
if not args.path.exists():
|
| 23 |
-
raise FileNotFoundError(f"Checkpoint not found: {args.path}")
|
| 24 |
-
|
| 25 |
-
api = HfApi()
|
| 26 |
-
try:
|
| 27 |
-
api.upload_file(
|
| 28 |
-
path_or_fileobj=str(args.path),
|
| 29 |
-
path_in_repo=args.path_in_repo,
|
| 30 |
-
repo_id=args.repo_id,
|
| 31 |
-
repo_type="space",
|
| 32 |
-
commit_message=args.commit_message,
|
| 33 |
-
token=args.token,
|
| 34 |
-
)
|
| 35 |
-
except HfHubHTTPError as exc:
|
| 36 |
-
print(
|
| 37 |
-
"Upload failed. Log in with a Hugging Face write token or set HF_TOKEN, then rerun:\n"
|
| 38 |
-
" python scripts/upload_checkpoint.py",
|
| 39 |
-
file=sys.stderr,
|
| 40 |
-
)
|
| 41 |
-
raise exc
|
| 42 |
-
print(f"Uploaded {args.path} to {args.repo_id}:{args.path_in_repo}")
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
if __name__ == "__main__":
|
| 46 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|