fix demo (add gradio requirement and fix download)
Browse files- app.py +1 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -17,7 +17,7 @@ args = parser.parse_args()
|
|
| 17 |
os.environ["RWKV_JIT_ON"] = '1'
|
| 18 |
|
| 19 |
from rwkv.model import RWKV
|
| 20 |
-
model_path = hf_hub_download(repo_id="Synthia/ChatGalRWKV
|
| 21 |
if os.environ['ON_COLAB'] == '1':
|
| 22 |
os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
|
| 23 |
model = RWKV(model=model_path, strategy='cuda bf16')
|
|
|
|
| 17 |
os.environ["RWKV_JIT_ON"] = '1'
|
| 18 |
|
| 19 |
from rwkv.model import RWKV
|
| 20 |
+
model_path = hf_hub_download(repo_id="Synthia/ChatGalRWKV", filename="rwkv-chatgal-v1-3B-ctx4096-epoch2.pth")
|
| 21 |
if os.environ['ON_COLAB'] == '1':
|
| 22 |
os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
|
| 23 |
model = RWKV(model=model_path, strategy='cuda bf16')
|
requirements.txt
CHANGED
|
@@ -4,4 +4,5 @@ tokenizers
|
|
| 4 |
torch
|
| 5 |
rwkv
|
| 6 |
pynvml
|
| 7 |
-
huggingface_hub
|
|
|
|
|
|
| 4 |
torch
|
| 5 |
rwkv
|
| 6 |
pynvml
|
| 7 |
+
huggingface_hub
|
| 8 |
+
gradio>=3.17.1
|