Spaces:
Runtime error
Runtime error
fix app script
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import argparse
|
|
3 |
from pathlib import Path
|
4 |
from typing import Optional, Union, Tuple, List
|
5 |
import subprocess
|
|
|
6 |
|
7 |
import gradio as gr
|
8 |
from PIL import Image
|
@@ -28,12 +29,7 @@ subprocess.call(f"unzip data/NotoSans.zip -d {str(Path(LOCAL_NOTO_ZIP_PATH).pare
|
|
28 |
assert Path("checkpoint/checkpoint.ckpt").exists()
|
29 |
assert Path("data/NotoSans").exists()
|
30 |
|
31 |
-
EXAMPLE_FONTS = sorted([
|
32 |
-
"example_fonts/BalooDa2-Bold.ttf",
|
33 |
-
"example_fonts/BalooDa2-Regular.ttf",
|
34 |
-
"example_fonts/Lalezar-Regular.ttf",
|
35 |
-
"example_fonts/MaShanZheng-Regular.ttf",
|
36 |
-
])
|
37 |
|
38 |
def parse_args():
|
39 |
|
|
|
3 |
from pathlib import Path
|
4 |
from typing import Optional, Union, Tuple, List
|
5 |
import subprocess
|
6 |
+
from itertools import chain
|
7 |
|
8 |
import gradio as gr
|
9 |
from PIL import Image
|
|
|
29 |
assert Path("checkpoint/checkpoint.ckpt").exists()
|
30 |
assert Path("data/NotoSans").exists()
|
31 |
|
32 |
+
EXAMPLE_FONTS = sorted([str(x) for x in chain(Path("example_fonts").glob("*.ttf"), Path("example_fonts").glob("*.otf"))])
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
def parse_args():
|
35 |
|
app.sh
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
export MODEL_CHECKPOINT_PATH=https://www.dropbox.com/scl/fi/zzkqe07g8gs5j21fmxsep/epoch-269-step-347490.ckpt?rlkey=goejowz4axcq5f5xxm69gadv6 && \
|
2 |
+
export NOTO_SANS_ZIP_PATH=https://www.dropbox.com/scl/fi/f7iclf71sh2luhpkbutjh/NotoSans.zip?rlkey=rr026nl5sj7i8xjp65s9377ni && \
|
3 |
+
python app.py
|