Update app.py
Browse files
app.py
CHANGED
@@ -45,15 +45,15 @@ from vega_datasets import data
|
|
45 |
iris = data.iris()
|
46 |
|
47 |
|
48 |
-
def scatter_plot_fn(
|
49 |
-
token = request.session.get('token')
|
50 |
if token:
|
51 |
sp = spotipy.Spotify(token)
|
52 |
results = sp.current_user()
|
53 |
-
|
54 |
-
|
55 |
return gr.ScatterPlot(
|
56 |
-
value=iris
|
|
|
57 |
)
|
58 |
|
59 |
|
|
|
45 |
iris = data.iris()
|
46 |
|
47 |
|
48 |
+
def scatter_plot_fn(request: gr.Request):
|
49 |
+
token = request.request.session.get('token')
|
50 |
if token:
|
51 |
sp = spotipy.Spotify(token)
|
52 |
results = sp.current_user()
|
53 |
+
|
|
|
54 |
return gr.ScatterPlot(
|
55 |
+
value=iris,
|
56 |
+
title=results["display_name"]
|
57 |
)
|
58 |
|
59 |
|