seyia92coding
commited on
Commit
•
fadd779
1
Parent(s):
127dd35
Update return to fig
Browse files
app.py
CHANGED
@@ -167,14 +167,12 @@ def gradio_music_graph(client_id, client_secret, artist_name): #total_albums
|
|
167 |
plt.tight_layout()
|
168 |
|
169 |
sns.boxplot(x=df["album_name"], y=df["popularity"], ax=ax)
|
170 |
-
fig.savefig('artist_popular_albums.png')
|
171 |
plt.show()
|
172 |
-
|
173 |
-
|
174 |
-
# return employee_data, plt.gcf(), regression_values
|
175 |
-
return df
|
176 |
#Interface will include these buttons based on parameters in the function with a dataframe output
|
177 |
music_plots = gr.Interface(gradio_music_graph, ["text", "text", "text"],
|
178 |
-
["
|
179 |
|
180 |
music_plots.launch(debug=True)
|
|
|
167 |
plt.tight_layout()
|
168 |
|
169 |
sns.boxplot(x=df["album_name"], y=df["popularity"], ax=ax)
|
170 |
+
#fig.savefig('artist_popular_albums.png')
|
171 |
plt.show()
|
172 |
+
|
173 |
+
return fig
|
|
|
|
|
174 |
#Interface will include these buttons based on parameters in the function with a dataframe output
|
175 |
music_plots = gr.Interface(gradio_music_graph, ["text", "text", "text"],
|
176 |
+
["plot"], title="Popular Songs By Album Box Plot Distribution on Spotify", description="Using your Spotify API Access from https://developer.spotify.com/ you can see your favourite artist's most popular albums on Spotify")
|
177 |
|
178 |
music_plots.launch(debug=True)
|