Spotify / app.py
GouthamVarma's picture
Upload 5 files
81b661c verified
raw
history blame
467 Bytes
import gradio as gr
import pandas as pd
import numpy as np
from sklearn.decomposition import TruncatedSVD
import time
from model import MatrixFactorization, create_gradio_interface
# Load the preprocessed data
df = pd.read_csv('data.csv')
# Initialize and train the model
mf_recommender = MatrixFactorization(n_factors=100)
mf_recommender.fit(df)
# Create and launch the Gradio interface
demo = create_gradio_interface(mf_recommender)
demo.launch()