Reccomender / app.py
UCMe's picture
Add output file
abc4f4b
raw
history blame contribute delete
359 Bytes
import gradio as gr
import pandas as pd
def greet(name):
df = pd.read_csv('finaloutput_recommender2.csv')
a = -1
for i in range(len(df)):
if(df['customer'].iloc[i] == int(name)) :
a = df['most_likely to buy'].iloc[i]
return a
return a
iface = gr.Interface(fn=greet, inputs="number", outputs="text")
iface.launch()