sps44's picture
old layout
0b70008
import pickle
import datasets
from renumics import spotlight
import os
import pandas as pd
from renumics.spotlight.layouts import debug_classification
from renumics.spotlight.layouts import compare_classification
if __name__ == "__main__":
cache_file_issues="metadata_issues.pkl"
# Load dataset using datasets.load_dataset()
ds = datasets.load_dataset("renumics/emodb-enriched", split="all")
print("Dataset loaded using datasets.load_dataset().")
with open(cache_file_issues, "rb") as issue_file:
issues = pickle.load(issue_file)
while True:
layout = debug_classification(label='gender', prediction='m1_gender_prediction', embedding='m1_embedding', features=['age', 'emotion'], inspect={'audio': spotlight.Audio})
#layout = compare_classification(label='gender', model1_prediction='m1_gender_prediction', model1_embedding='m1_embedding', model1_correct='m1_correct', model2_prediction='m2_gender_prediction', #model2_embedding='m2_embedding', model2_correct='m2_correct', inspect={'audio': spotlight.Audio})
view = spotlight.show(ds, issues=issues, port=7860, host="0.0.0.0", layout=layout,
allow_filebrowsing=False)
view.close()