Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,44 +54,29 @@ def make_prediction(REGION, TENURE, MONTANT, FREQUENCE_RECH, REVENUE, ARPU_SEGME
|
|
54 |
|
55 |
|
56 |
#create the input components for gradio
|
57 |
-
REGION = gr.inputs.Dropdown(choices =['DAKAR', 'THIES', 'SAINT-LOUIS', 'LOUGA', 'KAOLACK', 'DIOURBEL', 'TAMBACOUNDA' 'KAFFRINE,KOLDA', 'FATICK', 'MATAM', 'ZIGUINCHOR', 'SEDHIOU', 'KEDOUGOU'])
|
58 |
-
TENURE = gr.inputs.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'])
|
59 |
-
MONTANT = gr.inputs.Number()
|
60 |
-
FREQUENCE_RECH = gr.Number()
|
61 |
-
REVENUE = gr.Number()
|
62 |
-
ARPU_SEGMENT = gr.Number()
|
63 |
-
FREQUENCE = gr.Number()
|
64 |
-
DATA_VOLUME = gr.Number()
|
65 |
-
ON_NET = gr.Number()
|
66 |
-
ORANGE = gr.Number()
|
67 |
-
TIGO = gr.Number()
|
68 |
-
ZONE1 = gr.Number()
|
69 |
-
ZONE2 = gr.Number()
|
70 |
-
MRG = gr.inputs.Dropdown(choices =['NO'])
|
71 |
-
REGULARITY = gr.Number()
|
72 |
-
FREQ_TOP_PACK = gr.Number()
|
73 |
|
74 |
output = gr.Textbox(label='Prediction')
|
75 |
#create the interface component
|
76 |
|
77 |
-
app = gr.Interface(fn =make_prediction,inputs
|
78 |
-
TENURE,
|
79 |
-
MONTANT,
|
80 |
-
FREQUENCE_RECH,
|
81 |
-
REVENUE,
|
82 |
-
ARPU_SEGMENT,
|
83 |
-
FREQUENCE,
|
84 |
-
DATA_VOLUME,
|
85 |
-
ON_NET,
|
86 |
-
ORANGE,
|
87 |
-
TIGO,
|
88 |
-
ZONE1,
|
89 |
-
ZONE2,
|
90 |
-
MRG,
|
91 |
-
REGULARITY,
|
92 |
-
FREQ_TOP_PACK],
|
93 |
title ="Customer Churn Predictor",
|
94 |
-
description="Enter the
|
95 |
outputs = output)
|
96 |
|
97 |
app.launch(debug = True)
|
|
|
54 |
|
55 |
|
56 |
#create the input components for gradio
|
57 |
+
input_col1 = [REGION = gr.inputs.Dropdown(choices =['DAKAR', 'THIES', 'SAINT-LOUIS', 'LOUGA', 'KAOLACK', 'DIOURBEL', 'TAMBACOUNDA' 'KAFFRINE,KOLDA', 'FATICK', 'MATAM', 'ZIGUINCHOR', 'SEDHIOU', 'KEDOUGOU']),
|
58 |
+
TENURE = gr.inputs.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']),
|
59 |
+
MONTANT = gr.inputs.Number(),
|
60 |
+
FREQUENCE_RECH = gr.Number(),
|
61 |
+
REVENUE = gr.Number(),
|
62 |
+
ARPU_SEGMENT = gr.Number(),
|
63 |
+
FREQUENCE = gr.Number(),
|
64 |
+
DATA_VOLUME = gr.Number()]
|
65 |
+
input_col2 = [ON_NET = gr.Number(),
|
66 |
+
ORANGE = gr.Number(),
|
67 |
+
TIGO = gr.Number(),
|
68 |
+
ZONE1 = gr.Number(),
|
69 |
+
ZONE2 = gr.Number(),
|
70 |
+
MRG = gr.inputs.Dropdown(choices =['NO']),
|
71 |
+
REGULARITY = gr.Number(),
|
72 |
+
FREQ_TOP_PACK = gr.Number()]
|
73 |
|
74 |
output = gr.Textbox(label='Prediction')
|
75 |
#create the interface component
|
76 |
|
77 |
+
app = gr.Interface(fn =make_prediction,inputs=[input_col1, input_col2],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
title ="Customer Churn Predictor",
|
79 |
+
description="Enter the fields below and click the submit button to Make Your Prediction",
|
80 |
outputs = output)
|
81 |
|
82 |
app.launch(debug = True)
|