UCMe commited on
Commit
6815fb7
·
1 Parent(s): 7d5691d

Add application file

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import gradio as gr
2
 
3
- def greet(sale):
4
- df = pd.read_csv('result' )
 
5
  for i in range(len(df)):
6
- if(df['customer'].iloc[i] == sale) :
7
- return df['most_likely to buy'].loc[i]
8
- return -1
 
9
 
10
  iface = gr.Interface(fn=greet, inputs="int", outputs="text")
11
  iface.launch()
 
1
  import gradio as gr
2
 
3
+ def greet(name):
4
+ df = pd.read_csv('result')
5
+ a = "-1"
6
  for i in range(len(df)):
7
+ if(df['customer'].iloc[i] == name) :
8
+ a = df['most_likely to buy'].loc[i]
9
+ return a
10
+ return a
11
 
12
  iface = gr.Interface(fn=greet, inputs="int", outputs="text")
13
  iface.launch()