Gopala Krishna
commited on
Commit
·
ff26c0e
1
Parent(s):
8cb45d3
Working Clean
Browse files
.vs/UBCFProductRecommendations/FileContentIndex/52856ff2-fe43-4178-af57-cb76a26a0459.vsidx
ADDED
Binary file (11.7 kB). View file
|
|
.vs/UBCFProductRecommendations/FileContentIndex/7ff40909-b5d8-4c88-8906-d6cc681c52b1.vsidx
DELETED
Binary file (11.7 kB)
|
|
.vs/UBCFProductRecommendations/v17/.wsuo
CHANGED
Binary files a/.vs/UBCFProductRecommendations/v17/.wsuo and b/.vs/UBCFProductRecommendations/v17/.wsuo differ
|
|
app.py
CHANGED
@@ -2,7 +2,7 @@ import pandas as pd
|
|
2 |
from sklearn.metrics.pairwise import cosine_similarity
|
3 |
import gradio as gr
|
4 |
|
5 |
-
def recommend_items(
|
6 |
# Read data source Excel file.
|
7 |
df1 = pd.read_excel("UBCF_Online_Retail.xlsx")
|
8 |
df1a = df1.dropna(subset=['CustomerID'])
|
@@ -49,13 +49,10 @@ def recommend_items(file, customer_id_1, customer_id_2):
|
|
49 |
iface = gr.Interface(
|
50 |
fn=recommend_items,
|
51 |
inputs=[
|
52 |
-
gr.inputs.
|
53 |
-
gr.inputs.Number(label="Customer ID
|
54 |
-
gr.inputs.Number(label="Customer ID 2"),
|
55 |
],
|
56 |
outputs="dataframe",
|
57 |
-
title="Item Recommendation System",
|
58 |
-
description="This system recommends items for a customer based on another customer's purchase history.",
|
59 |
allow_flagging=False
|
60 |
)
|
61 |
|
|
|
2 |
from sklearn.metrics.pairwise import cosine_similarity
|
3 |
import gradio as gr
|
4 |
|
5 |
+
def recommend_items(customer_id_1, customer_id_2):
|
6 |
# Read data source Excel file.
|
7 |
df1 = pd.read_excel("UBCF_Online_Retail.xlsx")
|
8 |
df1a = df1.dropna(subset=['CustomerID'])
|
|
|
49 |
iface = gr.Interface(
|
50 |
fn=recommend_items,
|
51 |
inputs=[
|
52 |
+
gr.inputs.Number(label="Customer ID 1",default=12702),
|
53 |
+
gr.inputs.Number(label="Customer ID 2",default=14608),
|
|
|
54 |
],
|
55 |
outputs="dataframe",
|
|
|
|
|
56 |
allow_flagging=False
|
57 |
)
|
58 |
|