File size: 1,436 Bytes
7c4e98c
0d5194e
7c4e98c
 
0670634
 
 
 
 
 
 
 
 
73eddbd
0670634
 
 
 
 
 
 
c66809e
0670634
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c66809e
0670634
 
 
c66809e
 
 
 
 
0670634
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import gradio as gr
import spotipy


###########

from vega_datasets import data

iris = data.iris()


def scatter_plot_fn(dataset):
    return gr.ScatterPlot(
        value=iris
    )


##########
def get_started():
    # redirects to spotify and comes back
    # then generates plots
    return

with gr.Blocks() as demo:
    gr.Markdown(" ## Spotify Analyzer 🥳🎉")
    gr.Markdown("This app analyzes how cool your music taste is. We dare you to take this challenge!")
    with gr.Row():
        get_started_btn = gr.Button("Get Started")
    with gr.Row():
        with gr.Column():
            with gr.Row():
                with gr.Column():
                    plot = gr.ScatterPlot(show_label=False).style(container=True)
                with gr.Column():
                    plot = gr.ScatterPlot(show_label=False).style(container=True)
            with gr.Row():
                with gr.Column():
                    plot = gr.ScatterPlot(show_label=False).style(container=True)
                with gr.Column():
                    plot = gr.ScatterPlot(show_label=False).style(container=True)
    with gr.Row():
        gr.Markdown(" ### We have recommendations for you!")
    with gr.Row():
        gr.Dataframe(
            headers=["Song", "Album", "Artist"],
            datatype=["str", "str", "str"],
            label="Reccomended Songs",
        )
    demo.load(fn=scatter_plot_fn, outputs=plot)


demo.launch()