Spaces:
Sleeping
Sleeping
import time | |
import streamlit as st | |
# PAGE TITLE | |
st.set_page_config(page_title='Music Recommender App', page_icon='🎵') | |
# TITLE | |
st.title('Music Recommender App') | |
with st.sidebar: | |
st.header('Welcome to the Music Recommender System!') | |
st.write('This is a simple music recommender system that uses the Spotify API to recommend songs based on the song you input. The system uses the Spotify API to get the audio features of the song you input and then recommends songs that are similar to it.') | |
# sparation | |
st.write('---') | |
with st.expander('⚙️ Setting'): | |
num_rec = st.slider('Number of Recommendations', min_value=1, max_value=20, value=5) | |
with st.form(key='my_form'): | |
# INPUT | |
song_title = st.text_input("Song title", "") | |
generate_button = st.form_submit_button("Generate") | |
if generate_button: | |
with st.spinner('Generating Recommendations...'): | |
time.sleep(2) | |
st.write("Recommendations for", song_title) | |