Spaces:
Build error
Build error
Update app.py
Browse files14 unmodified lines1516171819202138 unmodified lines6061626364656614 unmodified lines# Load the modelmodel = hub.load('Audio_Multiple_v1')def class_names_from_csv(class_map_csv_text):"""Returns list of class names corresponding to score vector."""class_names = []38 unmodified linesconfidence_threshold = 0.60confident_classes = set()solutions=[]exclusion_list = ['Mechanisms','Domestic animals, pets', 'Animal', 'Silence', 'Alarm', 'Wind chime', 'Water', 'Livestock, farm animals, working animals', 'Wild animals', 'Bleat', 'Siren', 'Computer keyboard', 'Toot', 'Shatter', 'Bird','Caw', 'Independent music', 'Tender music', 'Ocean', 'House music', 'Middle Eastern music', 'Swing music', 'Soul music', 'Shofar', 'Motor vehicle (road)', 'White noise','Pink noise', 'Cacophony', 'Sidetone', 'Static', 'Outside, rural or natural', 'Outside, urban or manmade', 'Inside, public space', 'Inside, large room or hall', 'Inside, small room', 'Sound effect' ]for frame_scores in scores_np:for i, score in enumerate(frame_scores):14 unmodified lines1516171819202138 unmodified lines6061626364656614 unmodified lines# Load the modelmodel = hub.load('Audio_Multiple_v1')solutions=[]def class_names_from_csv(class_map_csv_text):"""Returns list of class names corresponding to score vector."""class_names = []38 unmodified linesconfidence_threshold = 0.60confident_classes = set()exclusion_list = ['Mechanisms','Domestic animals, pets', 'Animal', 'Silence', 'Alarm', 'Wind chime', 'Water', 'Livestock, farm animals, working animals', 'Wild animals', 'Bleat', 'Siren', 'Computer keyboard', 'Toot', 'Shatter', 'Bird','Caw', 'Independent music', 'Tender music', 'Ocean', 'House music', 'Middle Eastern music', 'Swing music', 'Soul music', 'Shofar', 'Motor vehicle (road)', 'White noise','Pink noise', 'Cacophony', 'Sidetone', 'Static', 'Outside, rural or natural', 'Outside, urban or manmade', 'Inside, public space', 'Inside, large room or hall', 'Inside, small room', 'Sound effect' ]for frame_scores in scores_np:for i, score in enumerate(frame_scores):
app.py+2-2