XciD HF staff commited on
Commit
3020ad1
1 Parent(s): adaa2d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -45,15 +45,15 @@ from vega_datasets import data
45
  iris = data.iris()
46
 
47
 
48
- def scatter_plot_fn(dataset, request: gr.Request):
49
- token = request.session.get('token')
50
  if token:
51
  sp = spotipy.Spotify(token)
52
  results = sp.current_user()
53
- print(f"Welcome to Gradio, {name}!\n{results}")
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