IS361Group4 commited on
Commit
88068a7
·
verified ·
1 Parent(s): 60d1809

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -19
app.py CHANGED
@@ -11,29 +11,33 @@ with gr.Blocks() as app:
11
  with gr.Tab("Churn Analysis"):
12
  gr.Markdown("Customer Churn Prediction")
13
 
14
- # Define your inputs for churn prediction
15
- with gr.Row():
16
- input_interface = [
17
- gr.Radio(['Yes', 'No'], label="Are you a Senior Citizen?"),
18
- gr.Radio(['Yes', 'No'], label="Do you have a Partner?"),
19
- gr.Radio(['No', 'Yes'], label="Do you have Dependents?"),
20
- gr.Slider(minimum=1, maximum=73, step=1, label="Tenure (in months)"),
21
- gr.Radio(['DSL', 'Fiber optic', 'No Internet'], label="Internet Service"),
22
- gr.Radio(['No', 'Yes'], label="Do you have Online Security?"),
23
- gr.Radio(['No', 'Yes'], label="Do you have Online Backup?"),
24
- gr.Radio(['No', 'Yes'], label="Do you have Device Protection?"),
25
- gr.Radio(['No', 'Yes'], label="Do you have Tech Support?"),
26
- gr.Radio(['No', 'Yes'], label="Do you have Streaming TV?"),
27
- gr.Radio(['No', 'Yes'], label="Do you have Streaming Movies?"),
28
- gr.Radio(['Month-to-month', 'One year', 'Two year'], label="Contract Type"),
29
- gr.Radio(['Yes', 'No'], label="Paperless Billing?"),
30
- gr.Radio(['Electronic check', 'Mailed check', 'Bank transfer (automatic)', 'Credit card (automatic)'], label="Payment Method"),
31
- gr.Slider(minimum=18.40, maximum=118.65, label="Monthly Charges")
32
- ]
33
 
34
  output_interface = gr.Label(label="Churn Prediction")
35
 
36
  predict_btn = gr.Button('Predict Churn')
37
  predict_btn.click(fn=predict, inputs=input_interface, outputs=output_interface)
 
 
 
 
38
 
39
  app.launch(share=True)
 
11
  with gr.Tab("Churn Analysis"):
12
  gr.Markdown("Customer Churn Prediction")
13
 
14
+ # Define your inputs for churn prediction
15
+ with gr.Row():
16
+ input_interface = [
17
+ gr.Radio(['Yes', 'No'], label="Are you a Senior Citizen?"),
18
+ gr.Radio(['Yes', 'No'], label="Do you have a Partner?"),
19
+ gr.Radio(['No', 'Yes'], label="Do you have Dependents?"),
20
+ gr.Slider(minimum=1, maximum=73, step=1, label="Tenure (in months)"),
21
+ gr.Radio(['DSL', 'Fiber optic', 'No Internet'], label="Internet Service"),
22
+ gr.Radio(['No', 'Yes'], label="Do you have Online Security?"),
23
+ gr.Radio(['No', 'Yes'], label="Do you have Online Backup?"),
24
+ gr.Radio(['No', 'Yes'], label="Do you have Device Protection?"),
25
+ gr.Radio(['No', 'Yes'], label="Do you have Tech Support?"),
26
+ gr.Radio(['No', 'Yes'], label="Do you have Streaming TV?"),
27
+ gr.Radio(['No', 'Yes'], label="Do you have Streaming Movies?"),
28
+ gr.Radio(['Month-to-month', 'One year', 'Two year'], label="Contract Type"),
29
+ gr.Radio(['Yes', 'No'], label="Paperless Billing?"),
30
+ gr.Radio(['Electronic check', 'Mailed check', 'Bank transfer (automatic)', 'Credit card (automatic)'], label="Payment Method"),
31
+ gr.Slider(minimum=18.40, maximum=118.65, label="Monthly Charges")
32
+ ]
33
 
34
  output_interface = gr.Label(label="Churn Prediction")
35
 
36
  predict_btn = gr.Button('Predict Churn')
37
  predict_btn.click(fn=predict, inputs=input_interface, outputs=output_interface)
38
+
39
+ with gr.Tab("Sentiment Analysis"):
40
+ sentiment_app = create_sentiment_tab()
41
+ sentiment_app.launch
42
 
43
  app.launch(share=True)