Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,37 +51,33 @@ def make_prediction(REGION, TENURE, MONTANT, FREQUENCE_RECH, REVENUE, ARPU_SEGME
|
|
51 |
return "Customer will not Churn"
|
52 |
|
53 |
# Create the input components for gradio
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
Number(),
|
77 |
-
Dropdown(choices=['NO']),
|
78 |
-
Number(),
|
79 |
-
Number()]
|
80 |
|
81 |
output = Textbox(label='Prediction')
|
82 |
|
83 |
# Wrap the input components in a Column component
|
84 |
-
inputs = Column(children=[input_col1, input_col2])
|
85 |
|
86 |
# Create the interface component
|
87 |
app = gr.Interface(fn=make_prediction, inputs=inputs,
|
|
|
51 |
return "Customer will not Churn"
|
52 |
|
53 |
# Create the input components for gradio
|
54 |
+
input_col1 = [Dropdown(choices=['DAKAR', 'THIES', 'SAINT-LOUIS', 'LOUGA', 'KAOLACK', 'DIOURBEL', 'TAMBACOUNDA', 'KAFFRINE', 'KOLDA']),
|
55 |
+
Dropdown(choices=['K > 24 month', 'I 18-21 month', 'H 15-18 month', 'G 12-15 month', 'J 21-24 month', 'F 9-12 month', 'E 6-9 month', 'D 3-6 month']),
|
56 |
+
Number(),
|
57 |
+
Number(),
|
58 |
+
Number(),
|
59 |
+
Number(),
|
60 |
+
Number(),
|
61 |
+
Number(),
|
62 |
+
Number()]
|
63 |
+
|
64 |
+
input_col2 = [Number(),
|
65 |
+
Number(),
|
66 |
+
Number(),
|
67 |
+
Number(),
|
68 |
+
Number(),
|
69 |
+
Number(),
|
70 |
+
Number(),
|
71 |
+
Number(),
|
72 |
+
Number(),
|
73 |
+
Dropdown(choices=['NO']),
|
74 |
+
Number(),
|
75 |
+
Number()]
|
|
|
|
|
|
|
|
|
76 |
|
77 |
output = Textbox(label='Prediction')
|
78 |
|
79 |
# Wrap the input components in a Column component
|
80 |
+
inputs = Column(children=[input_col1, input_col2], **kwargs={})
|
81 |
|
82 |
# Create the interface component
|
83 |
app = gr.Interface(fn=make_prediction, inputs=inputs,
|