Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import spaces
|
|
9 |
import torch
|
10 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
11 |
|
12 |
-
DESCRIPTION = "#
|
13 |
|
14 |
if not torch.cuda.is_available():
|
15 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
@@ -19,7 +19,7 @@ DEFAULT_MAX_NEW_TOKENS = 1024
|
|
19 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "32768"))
|
20 |
|
21 |
if torch.cuda.is_available():
|
22 |
-
model_id = "
|
23 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
|
24 |
model.eval()
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
@@ -130,4 +130,4 @@ demo = gr.ChatInterface(
|
|
130 |
)
|
131 |
|
132 |
if __name__ == "__main__":
|
133 |
-
demo.launch()
|
|
|
9 |
import torch
|
10 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
11 |
|
12 |
+
DESCRIPTION = "# Sakaltum-7B-chat"
|
13 |
|
14 |
if not torch.cuda.is_available():
|
15 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
|
|
19 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "32768"))
|
20 |
|
21 |
if torch.cuda.is_available():
|
22 |
+
model_id = "sakaltcommunity/sakaltum-7b"
|
23 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
|
24 |
model.eval()
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
|
130 |
)
|
131 |
|
132 |
if __name__ == "__main__":
|
133 |
+
demo.launch()
|