Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,11 @@ model = PeftModel.from_pretrained(
|
|
26 |
model, "tloen/alpaca-lora-7b",
|
27 |
torch_dtype=torch.float16
|
28 |
)
|
29 |
-
model.eval()
|
30 |
|
31 |
device = "cpu"
|
|
|
|
|
|
|
32 |
def evaluate_raw_prompt(
|
33 |
prompt:str,
|
34 |
temperature=0.1,
|
|
|
26 |
model, "tloen/alpaca-lora-7b",
|
27 |
torch_dtype=torch.float16
|
28 |
)
|
|
|
29 |
|
30 |
device = "cpu"
|
31 |
+
model.to(device)
|
32 |
+
model.eval()
|
33 |
+
|
34 |
def evaluate_raw_prompt(
|
35 |
prompt:str,
|
36 |
temperature=0.1,
|