Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -165,7 +165,6 @@ def interface(project_name, query, num_spotify_playlists=50):
|
|
| 165 |
df.sort_values(by=['popularity'], ascending=False, inplace=True)
|
| 166 |
|
| 167 |
with NamedTemporaryFile(delete=False, suffix='.xlsx') as tmpfile:
|
| 168 |
-
file_name = f"{project_name}.xlsx"
|
| 169 |
df.to_excel(tmpfile.name, index=False)
|
| 170 |
return df, tmpfile.name # Devuelve el DataFrame y el enlace al archivo Excel
|
| 171 |
|
|
@@ -177,7 +176,7 @@ iface = gr.Interface(
|
|
| 177 |
gr.Textbox(label="Keywords - Palabras Clave para tu búsqueda"),
|
| 178 |
gr.Number(label="Numero de Playlists que vamos a buscar con estas Keywords", value=50, minimum=1, maximum=1000)
|
| 179 |
],
|
| 180 |
-
outputs=[gr.Dataframe(), gr.File(label="Download Excel")],
|
| 181 |
title="Spotify Playlist Fetcher",
|
| 182 |
description="Enter a search query to fetch playlists and their songs from Spotify. Client credentials are pre-configured."
|
| 183 |
)
|
|
|
|
| 165 |
df.sort_values(by=['popularity'], ascending=False, inplace=True)
|
| 166 |
|
| 167 |
with NamedTemporaryFile(delete=False, suffix='.xlsx') as tmpfile:
|
|
|
|
| 168 |
df.to_excel(tmpfile.name, index=False)
|
| 169 |
return df, tmpfile.name # Devuelve el DataFrame y el enlace al archivo Excel
|
| 170 |
|
|
|
|
| 176 |
gr.Textbox(label="Keywords - Palabras Clave para tu búsqueda"),
|
| 177 |
gr.Number(label="Numero de Playlists que vamos a buscar con estas Keywords", value=50, minimum=1, maximum=1000)
|
| 178 |
],
|
| 179 |
+
outputs=[gr.Dataoutputs=[gr.Dataframe(), gr.File(label="Download Excel")],
|
| 180 |
title="Spotify Playlist Fetcher",
|
| 181 |
description="Enter a search query to fetch playlists and their songs from Spotify. Client credentials are pre-configured."
|
| 182 |
)
|