Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ def pianocktail(unit='mL', record=False, url=None, midi=None, audio=None, proces
|
|
107 |
cocktail_rep, affective_cluster_id, affect = music2cocktailrep(music_ai_rep, music_handcoded_rep, verbose=verbose, level=level+2)
|
108 |
with st.spinner("Trying recipes (15s).."):
|
109 |
cocktail_recipes, scores = cocktailrep2recipe(cocktail_rep, unit=unit, target_affective_cluster=affective_cluster_id, verbose=verbose, full_verbose=verbose, \
|
110 |
-
|
111 |
|
112 |
cocktail_recipe = cocktail_recipes[0]
|
113 |
recipe_score = scores[0]
|
@@ -126,7 +126,8 @@ def pianocktail(unit='mL', record=False, url=None, midi=None, audio=None, proces
|
|
126 |
st.error('Error in listening. Is the url valid? the audio an .mp3? the midi a .mid?')
|
127 |
cocktail_recipe = None
|
128 |
debug_info = None
|
129 |
-
except:
|
|
|
130 |
st.error('Error: ' + error)
|
131 |
cocktail_recipe = None
|
132 |
debug_info = None
|
|
|
107 |
cocktail_rep, affective_cluster_id, affect = music2cocktailrep(music_ai_rep, music_handcoded_rep, verbose=verbose, level=level+2)
|
108 |
with st.spinner("Trying recipes (15s).."):
|
109 |
cocktail_recipes, scores = cocktailrep2recipe(cocktail_rep, unit=unit, target_affective_cluster=affective_cluster_id, verbose=verbose, full_verbose=verbose, \
|
110 |
+
level=level+2)
|
111 |
|
112 |
cocktail_recipe = cocktail_recipes[0]
|
113 |
recipe_score = scores[0]
|
|
|
126 |
st.error('Error in listening. Is the url valid? the audio an .mp3? the midi a .mid?')
|
127 |
cocktail_recipe = None
|
128 |
debug_info = None
|
129 |
+
except Exception as err:
|
130 |
+
print(err, error)
|
131 |
st.error('Error: ' + error)
|
132 |
cocktail_recipe = None
|
133 |
debug_info = None
|