Spaces:
Runtime error
Runtime error
import os | |
def get_label_for_query(image_url, model_name): | |
fourway_label = image_url.split('/')[-2] | |
if fourway_label=='both_correct': | |
return 'Correct' | |
if fourway_label=='both_wrong': | |
return 'Wrong' | |
if fourway_label == 'chm_correct_knn_incorrect' and model_name == 'CHM': | |
return 'Correct' | |
elif fourway_label == 'knn_correct_chm_incorrect' and model_name == 'KNN': | |
return 'Correct' | |
return 'Wrong' | |
def get_category(image_url): | |
return image_url.split('/')[-2] | |
def translate_winds_to_names(winds): | |
return [folder_to_name[x] for x in winds] |