Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,11 +37,11 @@ h3 {
|
|
37 |
"""
|
38 |
|
39 |
model = AutoModelForCausalLM.from_pretrained(
|
40 |
-
|
41 |
torch_dtype=torch.float16,
|
42 |
device_map="auto",
|
43 |
)
|
44 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
45 |
|
46 |
@spaces.GPU
|
47 |
def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
|
|
|
37 |
"""
|
38 |
|
39 |
model = AutoModelForCausalLM.from_pretrained(
|
40 |
+
MODEL_ID,
|
41 |
torch_dtype=torch.float16,
|
42 |
device_map="auto",
|
43 |
)
|
44 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
45 |
|
46 |
@spaces.GPU
|
47 |
def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
|