Johnyquest7
commited on
Update app.py
Browse filesinternlm/internlm2_5-7b-chat
app.py
CHANGED
@@ -5,7 +5,7 @@ import spaces
|
|
5 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
6 |
|
7 |
|
8 |
-
TITLE = "<h1><center>Chat with
|
9 |
|
10 |
DESCRIPTION = "<h3><center>An experimental space.</center></h3>"
|
11 |
|
@@ -102,8 +102,8 @@ CSS = """
|
|
102 |
"""
|
103 |
|
104 |
|
105 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
106 |
-
model = AutoModelForCausalLM.from_pretrained("
|
107 |
|
108 |
|
109 |
@spaces.GPU
|
|
|
5 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
6 |
|
7 |
|
8 |
+
TITLE = "<h1><center>Chat with internlm/internlm2_5-7b-chat</center></h1>"
|
9 |
|
10 |
DESCRIPTION = "<h3><center>An experimental space.</center></h3>"
|
11 |
|
|
|
102 |
"""
|
103 |
|
104 |
|
105 |
+
tokenizer = AutoTokenizer.from_pretrained("internlm/internlm2_5-7b-chat")
|
106 |
+
model = AutoModelForCausalLM.from_pretrained("internlm/internlm2_5-7b-chat", torch_dtype="auto", device_map="auto",trust_remote_code=True)
|
107 |
|
108 |
|
109 |
@spaces.GPU
|