Spaces:
Build error
Build error
- app.py +2 -1
- scripts/generate_prompt.py +0 -1
app.py
CHANGED
|
@@ -211,6 +211,7 @@ with gr.Blocks() as demo:
|
|
| 211 |
)
|
| 212 |
|
| 213 |
# JavaScriptの読み込み
|
| 214 |
-
demo.load(
|
| 215 |
|
|
|
|
| 216 |
demo.launch()
|
|
|
|
| 211 |
)
|
| 212 |
|
| 213 |
# JavaScriptの読み込み
|
| 214 |
+
demo.load(js=script)
|
| 215 |
|
| 216 |
+
initialize_models()
|
| 217 |
demo.launch()
|
scripts/generate_prompt.py
CHANGED
|
@@ -41,7 +41,6 @@ def download_model_files(repo_id, model_dir, sub_dir, files, sub_files):
|
|
| 41 |
for file in sub_files:
|
| 42 |
hf_hub_download(repo_id, file, subfolder=sub_dir, cache_dir=os.path.join(model_dir, sub_dir), force_download=True, force_filename=file)
|
| 43 |
|
| 44 |
-
@spaces.GPU
|
| 45 |
def load_wd14_tagger_model():
|
| 46 |
"""WD14タグ付けモデルをロード"""
|
| 47 |
model_dir = "wd14_tagger_model"
|
|
|
|
| 41 |
for file in sub_files:
|
| 42 |
hf_hub_download(repo_id, file, subfolder=sub_dir, cache_dir=os.path.join(model_dir, sub_dir), force_download=True, force_filename=file)
|
| 43 |
|
|
|
|
| 44 |
def load_wd14_tagger_model():
|
| 45 |
"""WD14タグ付けモデルをロード"""
|
| 46 |
model_dir = "wd14_tagger_model"
|