|
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(): |
|
|
|
|
|
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() |
|
demo.load(fn=scatter_plot_fn, outputs=plot) |
|
|
|
|
|
demo.launch() |