Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
from __future__ import annotations
|
2 |
import os
|
|
|
|
|
|
|
3 |
#download for mecab
|
4 |
os.system('python -m unidic download')
|
5 |
|
@@ -77,7 +80,8 @@ model.load_checkpoint(
|
|
77 |
eval=True,
|
78 |
use_deepspeed=True,
|
79 |
)
|
80 |
-
|
|
|
81 |
print("Done loading TTS")
|
82 |
|
83 |
#####llm_model = os.environ.get("LLM_MODEL", "mistral") # or "zephyr"
|
|
|
1 |
from __future__ import annotations
|
2 |
import os
|
3 |
+
#Use GPU
|
4 |
+
is_gpu=False
|
5 |
+
|
6 |
#download for mecab
|
7 |
os.system('python -m unidic download')
|
8 |
|
|
|
80 |
eval=True,
|
81 |
use_deepspeed=True,
|
82 |
)
|
83 |
+
if is_gpu:
|
84 |
+
model.cuda()
|
85 |
print("Done loading TTS")
|
86 |
|
87 |
#####llm_model = os.environ.get("LLM_MODEL", "mistral") # or "zephyr"
|