Skip to content

Commit 5a00191

Browse files
authored
Merge pull request #34 from enesozeren/train_script_fix
predict script fix
2 parents 37fca30 + d270ab5 commit 5a00191

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

mlops_project/predict_model.py

-4
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ def predict(model_path: str, dataset_path: str) -> None:
3030
model.load_state_dict(torch.load(model_path, map_location=device))
3131
model.eval()
3232

33-
# Set the device to GPU if available
34-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
35-
model.to(device)
36-
3733
# Read the dataset
3834
tweets, _ = read_dataset(dataset_path)
3935

0 commit comments

Comments
 (0)