Spaces:
Sleeping
Sleeping
Kamil Piekarz commited on
Commit ·
71c65ea
1
Parent(s): 250d11b
adjusted app
Browse files- add_click_app.py +8 -7
add_click_app.py
CHANGED
|
@@ -14,18 +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([
|
| 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 |
gr.Interface(
|
|
|
|
| 14 |
return f"Clicked: {'Yes' if predicted_click == 1 else 'No'}"
|
| 15 |
|
| 16 |
inputs = [
|
| 17 |
+
gr.Radio(["Male", "Female", "Non-Binary"], label="Gender"),
|
| 18 |
+
gr.Radio(["Desktop", "Mobile", "Tablet"], label="Device Type"),
|
| 19 |
+
gr.Radio(["Top", "Side", "Bottom"], label="Ad Position"),
|
| 20 |
+
gr.Radio(["Shopping", "Education", "Entertainment", "Social Media", "News"], label="Browsing History"),
|
| 21 |
+
gr.Radio(["Afternoon", "Night", "Evening", "Morning"], label="Time of Day"),
|
| 22 |
gr.Slider(18, 64, step=1, label="Age"),
|
| 23 |
]
|
| 24 |
outputs = gr.Label()
|
| 25 |
|
| 26 |
examples = [
|
| 27 |
+
["Male", "Desktop", "Top", "Shopping", "Afternoon", 25],
|
| 28 |
+
["Female", "Mobile", "Side", "News", "Night", 36],
|
| 29 |
+
["Non-Binary", "Tablet", "Bottom", "Entertainment", "Morning", 44],
|
| 30 |
]
|
| 31 |
|
| 32 |
gr.Interface(
|