Diego-0121 commited on
Commit
185cc28
1 Parent(s): add24aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -41,18 +41,7 @@ def recommend_with_youtube_links(song_name, artist_name):
41
  api_key = "AIzaSyAnFiRh8g13HW_wLhUW7wZwRE2SsPo0aJs"
42
  recommendations = recommend_song_interface(song_name, artist_name)
43
  recommendations_with_links = add_youtube_links(recommendations, api_key)
44
- html_links = [
45
- f"<div style='margin: 10px; padding: 10px; border: 1px solid #ccc; border-radius: 5px;'>"
46
- f"{rec}<br><a href='{link}' target='_blank'>YouTube Link</a></div>"
47
- if rec and link.startswith('http') else ""
48
- for rec, link in recommendations_with_links
49
- ]
50
-
51
- # Aseg煤rate de devolver la cantidad correcta de salidas esperadas por la interfaz Gradio
52
- while len(html_links) < 4:
53
- html_links.append("")
54
-
55
- return "<br>".join(html_links[:4])
56
 
57
  # Configuraci贸n de la interfaz Gradio
58
  iface = gr.Interface(
 
41
  api_key = "AIzaSyAnFiRh8g13HW_wLhUW7wZwRE2SsPo0aJs"
42
  recommendations = recommend_song_interface(song_name, artist_name)
43
  recommendations_with_links = add_youtube_links(recommendations, api_key)
44
+ return recommendations_with_youtube_links
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  # Configuraci贸n de la interfaz Gradio
47
  iface = gr.Interface(