Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,10 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 12 |
MODEL_NAME,
|
| 13 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
| 14 |
device_map="auto",
|
|
|
|
| 15 |
)
|
| 16 |
|
|
|
|
| 17 |
# Chat function
|
| 18 |
def chat(user_input, history, max_new_tokens=200, temperature=1.0):
|
| 19 |
messages = []
|
|
|
|
| 12 |
MODEL_NAME,
|
| 13 |
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
| 14 |
device_map="auto",
|
| 15 |
+
trust_remote_code=True,
|
| 16 |
)
|
| 17 |
|
| 18 |
+
|
| 19 |
# Chat function
|
| 20 |
def chat(user_input, history, max_new_tokens=200, temperature=1.0):
|
| 21 |
messages = []
|