Spaces:
Running on Zero
Running on Zero
Update app.py
#2
by FlameF0X - opened
app.py
CHANGED
|
@@ -234,10 +234,10 @@ def load_model():
|
|
| 234 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 235 |
print(f"Loading FWKV-ROSA from Hub on {device} ...")
|
| 236 |
try:
|
| 237 |
-
model = FWKVLanguageModel.from_pretrained("
|
| 238 |
model = model.to(device)
|
| 239 |
model.eval()
|
| 240 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 241 |
status = "FWKV-ROSA chat model ready!"
|
| 242 |
except Exception as e:
|
| 243 |
model, tokenizer = None, None
|
|
@@ -390,7 +390,7 @@ def chat_function(message, history):
|
|
| 390 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 391 |
gr.Markdown(f"""
|
| 392 |
# ⚡ FWKV-ROSA Chat
|
| 393 |
-
**Model:** [
|
| 394 |
*{load_status}*
|
| 395 |
|
| 396 |
This is a 56M‑parameter recurrent LM trained with the RWKV‑8 ROSA
|
|
|
|
| 234 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 235 |
print(f"Loading FWKV-ROSA from Hub on {device} ...")
|
| 236 |
try:
|
| 237 |
+
model = FWKVLanguageModel.from_pretrained("FWKV/FWKV-ROSA")
|
| 238 |
model = model.to(device)
|
| 239 |
model.eval()
|
| 240 |
+
tokenizer = AutoTokenizer.from_pretrained("FWKV/FWKV-ROSA")
|
| 241 |
status = "FWKV-ROSA chat model ready!"
|
| 242 |
except Exception as e:
|
| 243 |
model, tokenizer = None, None
|
|
|
|
| 390 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 391 |
gr.Markdown(f"""
|
| 392 |
# ⚡ FWKV-ROSA Chat
|
| 393 |
+
**Model:** [FWKV/FWKV-ROSA](https://huggingface.co/FWKV/FWKV-ROSA)
|
| 394 |
*{load_status}*
|
| 395 |
|
| 396 |
This is a 56M‑parameter recurrent LM trained with the RWKV‑8 ROSA
|