added model training
This commit is contained in:
parent
1f42dd374e
commit
cd670b95ea
@ -14,23 +14,19 @@ def check_datasets_presence():
|
|||||||
|
|
||||||
dataset_1 = "Spotify_Dataset.csv"
|
dataset_1 = "Spotify_Dataset.csv"
|
||||||
dataset_2 = "spotify_songs.csv"
|
dataset_2 = "spotify_songs.csv"
|
||||||
destination_folder = "datasets"
|
destination_folder = "artifacts"
|
||||||
|
|
||||||
if not os.path.exists(destination_folder):
|
if not os.path.exists(destination_folder):
|
||||||
os.makedirs(destination_folder)
|
raise FileNotFoundError(destination_folder + " folder not found")
|
||||||
print(f"Utworzono folder: {destination_folder}")
|
|
||||||
else:
|
|
||||||
print(f"Folder {destination_folder} już istnieje.")
|
|
||||||
|
|
||||||
if dataset_1 in os.listdir("/."):
|
if dataset_1 in os.listdir("/."):
|
||||||
shutil.move(dataset_1, destination_folder)
|
shutil.move(dataset_1, destination_folder)
|
||||||
elif dataset_1 not in os.listdir(destination_folder):
|
elif dataset_1 not in os.listdir(destination_folder):
|
||||||
raise FileNotFoundError(dataset_1 + "not found")
|
raise FileNotFoundError(dataset_1 + " not found")
|
||||||
|
|
||||||
if dataset_2 in os.listdir("/."):
|
if dataset_2 in os.listdir("/."):
|
||||||
shutil.move(dataset_2, destination_folder)
|
shutil.move(dataset_2, destination_folder)
|
||||||
elif dataset_2 not in os.listdir(destination_folder):
|
elif dataset_2 not in os.listdir(destination_folder):
|
||||||
raise FileNotFoundError(dataset_2 + "not found")
|
raise FileNotFoundError(dataset_2 + " not found")
|
||||||
|
|
||||||
def datasets_preparation():
|
def datasets_preparation():
|
||||||
df_1 = pd.read_csv("datasets/spotify_songs.csv")
|
df_1 = pd.read_csv("datasets/spotify_songs.csv")
|
||||||
|
Loading…
Reference in New Issue
Block a user