Spaces:
Sleeping
Sleeping
| 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() | |