Spaces:
Sleeping
Sleeping
Kamil Piekarz commited on
Commit ·
ea85de6
1
Parent(s): 53a1f14
adjusted app
Browse files- add_click_app.py +8 -8
- 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(["
|
| 18 |
-
gr.Radio(["
|
| 19 |
-
gr.Radio(["
|
| 20 |
-
gr.Radio(["News", "
|
| 21 |
-
gr.Radio(["
|
| 22 |
gr.Slider(18, 64, step=1, label="Age"),
|
| 23 |
]
|
| 24 |
outputs = gr.Label()
|
| 25 |
|
| 26 |
examples = [
|
| 27 |
-
["
|
| 28 |
-
["
|
| 29 |
-
["
|
| 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
|