Spaces:
Sleeping
Sleeping
Add application file
Browse files
app.py
CHANGED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def greet(
|
| 4 |
-
df = pd.read_csv('result'
|
|
|
|
| 5 |
for i in range(len(df)):
|
| 6 |
-
if(df['customer'].iloc[i] ==
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 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()
|