Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,14 @@ import numpy as np
|
|
| 4 |
import gradio as gr
|
| 5 |
import spaces
|
| 6 |
|
| 7 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
print("Loading finished.")
|
| 11 |
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
import spaces
|
| 6 |
|
| 7 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 8 |
+
"microsoft/Phi-3-mini-4k-instruct",
|
| 9 |
+
device_map="cuda",
|
| 10 |
+
torch_dtype="auto",
|
| 11 |
+
trust_remote_code=True,
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-4k-instruct")
|
| 15 |
|
| 16 |
print("Loading finished.")
|
| 17 |
|