Polarisailabs commited on
Commit
bcb63ab
·
verified ·
1 Parent(s): c80d2cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,5 +11,5 @@ def recommend_items(customer_id_1,customer_id_2):
11
  try:K=set(A.loc[G].iloc[A.loc[G].to_numpy().nonzero()].index)
12
  except KeyError:return pd.DataFrame({H:['Customer ID 2 is invalid. Please enter a valid Customer ID']})
13
  L=J-K;return E.loc[E[D].isin(L),[D,'Description']].drop_duplicates().set_index(D)
14
- iface=gr.Interface(fn=recommend_items,inputs=[gr.inputs.Number(label='Customer ID 1'),gr.inputs.Number(label='Customer ID 2')],outputs=gr.outputs.Dataframe(label='Recommended Items for Customer 2',type='pandas'),theme=gr.themes.Default(primary_hue='slate'),allow_flagging=False)
15
  iface.launch()
 
11
  try:K=set(A.loc[G].iloc[A.loc[G].to_numpy().nonzero()].index)
12
  except KeyError:return pd.DataFrame({H:['Customer ID 2 is invalid. Please enter a valid Customer ID']})
13
  L=J-K;return E.loc[E[D].isin(L),[D,'Description']].drop_duplicates().set_index(D)
14
+ iface=gr.Interface(fn=recommend_items,inputs=[gr.inputs.Number(label='Customer ID 1'),gr.inputs.Number(label='Customer ID 2')],outputs=gr.outputs.Dataframe(label='Recommended Items for Customer 2',type='pandas'),theme=gr.themes.Default(primary_hue='sky'),allow_flagging=False)
15
  iface.launch()