Spaces:
Runtime error
Runtime error
ehristoforu
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Iterator
|
|
5 |
import gradio as gr
|
6 |
import spaces
|
7 |
import torch
|
8 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer,
|
9 |
from peft import AutoPeftModelForCausalLM
|
10 |
|
11 |
DESCRIPTION = """\
|
@@ -24,7 +24,7 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
24 |
|
25 |
model_name = "estrogen/c4ai-command-r7b-12-2024"
|
26 |
|
27 |
-
model =
|
28 |
model_name,
|
29 |
torch_dtype=torch.float16,
|
30 |
trust_remote_code=True
|
|
|
5 |
import gradio as gr
|
6 |
import spaces
|
7 |
import torch
|
8 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer, Llama3ForCausalLM
|
9 |
from peft import AutoPeftModelForCausalLM
|
10 |
|
11 |
DESCRIPTION = """\
|
|
|
24 |
|
25 |
model_name = "estrogen/c4ai-command-r7b-12-2024"
|
26 |
|
27 |
+
model = Llama3ForCausalLM.from_pretrained(
|
28 |
model_name,
|
29 |
torch_dtype=torch.float16,
|
30 |
trust_remote_code=True
|