remove paths
This commit is contained in:
@@ -11,13 +11,13 @@ from tqdm import tqdm
|
|||||||
from sklearn.metrics import accuracy_score
|
from sklearn.metrics import accuracy_score
|
||||||
|
|
||||||
# Load dataset
|
# Load dataset
|
||||||
dataset = ESC50(root="C:\\Users\\benjaminm\\Datasets", download=False)
|
dataset = ESC50(root="data_path", download=False)
|
||||||
prompt = 'this is a sound of '
|
prompt = 'this is a sound of '
|
||||||
y = [prompt + x for x in dataset.classes]
|
y = [prompt + x for x in dataset.classes]
|
||||||
|
|
||||||
|
|
||||||
# Load and initialize CLAP
|
# 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)
|
clap_model = CLAPWrapper(weights_path, use_cuda=False)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ from esc50_dataset import ESC50
|
|||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
|
|
||||||
# Load ESC50 dataset
|
# 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, target, one_hot_target = dataset[1000]
|
||||||
audio_file = [audio_file]
|
audio_file = [audio_file]
|
||||||
prompt = 'this is a sound of '
|
prompt = 'this is a sound of '
|
||||||
y = [prompt + x for x in dataset.classes]
|
y = [prompt + x for x in dataset.classes]
|
||||||
|
|
||||||
# Load and initialize CLAP
|
# 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
|
# Setting use_cuda = True will load the model on a GPU using CUDA
|
||||||
clap_model = CLAPWrapper(weights_path, use_cuda=False)
|
clap_model = CLAPWrapper(weights_path, use_cuda=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user