Kamil Piekarz commited on
Commit
ea85de6
·
1 Parent(s): 53a1f14

adjusted app

Browse files
Files changed (2) hide show
  1. add_click_app.py +8 -8
  2. requirements.txt +1 -1
add_click_app.py CHANGED
@@ -14,19 +14,19 @@ def predict_click(gender, device_type, ad_position, browsing_history, time_of_da
14
  return f"Clicked: {'Yes' if predicted_click == 1 else 'No'}"
15
 
16
  inputs = [
17
- gr.Radio(["Male", "Female"], label="Gender"),
18
- gr.Radio(["Mobile", "Desktop", "Tablet"], label="Device Type"),
19
- gr.Radio(["Top", "Bottom", "Sidebar"], label="Ad Position"),
20
- gr.Radio(["News", "Tech", "Other"], label="Browsing History"),
21
- gr.Radio(["Morning", "Afternoon", "Evening", "Night"], label="Time of Day"),
22
  gr.Slider(18, 64, step=1, label="Age"),
23
  ]
24
  outputs = gr.Label()
25
 
26
  examples = [
27
- ["Male", "Mobile", "Top", "News", "Morning", 25],
28
- ["Female", "Desktop", "Sidebar", "Tech", "Evening", 37],
29
- ["Male", "Tablet", "Bottom", "Other", "Night", 44],
30
  ]
31
 
32
  gr.Interface(
 
14
  return f"Clicked: {'Yes' if predicted_click == 1 else 'No'}"
15
 
16
  inputs = [
17
+ gr.Radio(["Female", "Male"], label="Gender"),
18
+ gr.Radio(["Desktop", "Mobile", "Tablet"], label="Device Type"),
19
+ gr.Radio(["Bottom", "Sidebar", "Top"], label="Ad Position"),
20
+ gr.Radio(["News", "Other", "Sports", "Tech"], label="Browsing History"),
21
+ gr.Radio(["Afternoon", "Evening", "Morning", "Night"], label="Time of Day"),
22
  gr.Slider(18, 64, step=1, label="Age"),
23
  ]
24
  outputs = gr.Label()
25
 
26
  examples = [
27
+ ["Female", "Desktop", "Sidebar", "Sports", "Morning", 31],
28
+ ["Male", "Mobile", "Top", "News", "Afternoon", 29],
29
+ ["Female", "Tablet", "Bottom", "Other", "Night", 42],
30
  ]
31
 
32
  gr.Interface(
requirements.txt CHANGED
@@ -2,4 +2,4 @@ gradio
2
  skops
3
  pandas
4
  scikit-learn
5
- numpy
 
2
  skops
3
  pandas
4
  scikit-learn
5
+ numpy