From 355b34a16b4e87f9011f040831d4ce32eaf6cff5 Mon Sep 17 00:00:00 2001 From: Benjamin Elizalde <26778834+bmartin1@users.noreply.github.com> Date: Thu, 10 Nov 2022 14:55:54 -0800 Subject: [PATCH] remove paths --- src/zero_shot_classification.py | 4 ++-- src/zero_shot_predictions.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zero_shot_classification.py b/src/zero_shot_classification.py index 098184d..4db423c 100644 --- a/src/zero_shot_classification.py +++ b/src/zero_shot_classification.py @@ -11,13 +11,13 @@ from tqdm import tqdm from sklearn.metrics import accuracy_score # Load dataset -dataset = ESC50(root="C:\\Users\\benjaminm\\Datasets", download=False) +dataset = ESC50(root="data_path", download=False) prompt = 'this is a sound of ' y = [prompt + x for x in dataset.classes] # Load and initialize CLAP -weights_path = "C:\\Users\\benjaminm\\OneDrive - Microsoft\\CLAP_shared\\CLAP_models\\best.pth" +weights_path = "weights_path" clap_model = CLAPWrapper(weights_path, use_cuda=False) diff --git a/src/zero_shot_predictions.py b/src/zero_shot_predictions.py index e8297b5..03ea01c 100644 --- a/src/zero_shot_predictions.py +++ b/src/zero_shot_predictions.py @@ -8,14 +8,14 @@ from esc50_dataset import ESC50 import torch.nn.functional as F # Load ESC50 dataset -dataset = ESC50(root="C:\\Users\\benjaminm\\Datasets", download=True) # set download=True when dataset is not downloaded +dataset = ESC50(root="data_path", download=True) # set download=True when dataset is not downloaded audio_file, target, one_hot_target = dataset[1000] audio_file = [audio_file] prompt = 'this is a sound of ' y = [prompt + x for x in dataset.classes] # Load and initialize CLAP -weights_path = "C:\\Users\\benjaminm\\OneDrive - Microsoft\\CLAP_shared\\CLAP_models\\best.pth" +weights_path = "weights_path" # Setting use_cuda = True will load the model on a GPU using CUDA clap_model = CLAPWrapper(weights_path, use_cuda=False)