Spaces:
Runtime error
Runtime error
nickkornienko
commited on
Commit
•
9d7da71
1
Parent(s):
749c535
added feedback submit confirmation
Browse files- app.py +7 -3
- feedback_data/feedback_data.csv +33 -0
app.py
CHANGED
@@ -142,18 +142,22 @@ with app:
|
|
142 |
def collect_feedback(tags, *feedbacks):
|
143 |
global song_recommendations
|
144 |
feedbacks = list(feedbacks)
|
145 |
-
|
|
|
|
|
|
|
146 |
|
147 |
feedback_submit_button.click(
|
148 |
fn=collect_feedback,
|
149 |
inputs=[tags_input] + feedback_inputs,
|
150 |
-
outputs=
|
151 |
)
|
152 |
|
153 |
for i in range(5):
|
154 |
with gr.Row():
|
155 |
gr.Column([recommendation_outputs[i], feedback_inputs[i]])
|
156 |
|
157 |
-
gr.Row(
|
|
|
158 |
|
159 |
app.launch()
|
|
|
142 |
def collect_feedback(tags, *feedbacks):
|
143 |
global song_recommendations
|
144 |
feedbacks = list(feedbacks)
|
145 |
+
record_feedback(tags, song_recommendations, feedbacks)
|
146 |
+
return "Feedback submitted successfully!"
|
147 |
+
|
148 |
+
feedback_confirmation = gr.Markdown("")
|
149 |
|
150 |
feedback_submit_button.click(
|
151 |
fn=collect_feedback,
|
152 |
inputs=[tags_input] + feedback_inputs,
|
153 |
+
outputs=feedback_confirmation
|
154 |
)
|
155 |
|
156 |
for i in range(5):
|
157 |
with gr.Row():
|
158 |
gr.Column([recommendation_outputs[i], feedback_inputs[i]])
|
159 |
|
160 |
+
with gr.Row():
|
161 |
+
gr.Column([feedback_submit_button, feedback_confirmation])
|
162 |
|
163 |
app.launch()
|
feedback_data/feedback_data.csv
CHANGED
@@ -76,3 +76,36 @@ rock,Heartburn,Thumbs Up
|
|
76 |
rock,Crazy,Thumbs Down
|
77 |
rock,Hurry Up And Come,Thumbs Up
|
78 |
rock,Hotel,Thumbs Down
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
rock,Crazy,Thumbs Down
|
77 |
rock,Hurry Up And Come,Thumbs Up
|
78 |
rock,Hotel,Thumbs Down
|
79 |
+
pop,Helium,Thumbs Up
|
80 |
+
country,S.O.S.,Thumbs Up
|
81 |
+
country,S.O.S.,Thumbs Up
|
82 |
+
country,Dios Bendiga,Thumbs Down
|
83 |
+
country,Rock Steady,Thumbs Down
|
84 |
+
country,S.O.S.,Thumbs Up
|
85 |
+
country,Dios Bendiga,Thumbs Down
|
86 |
+
country,Rock Steady,Thumbs Down
|
87 |
+
rock,Heartburn,Thumbs Up
|
88 |
+
rock,Crazy,Thumbs Down
|
89 |
+
rock,Hurry Up And Come,Thumbs Up
|
90 |
+
rock,Hotel,Thumbs Down
|
91 |
+
rock,If I Ain't Got You,Thumbs Up
|
92 |
+
rock,Heartburn,Thumbs Up
|
93 |
+
rock,Crazy,Thumbs Down
|
94 |
+
rock,Hurry Up And Come,Thumbs Up
|
95 |
+
rock,Hotel,Thumbs Down
|
96 |
+
rock,If I Ain't Got You,Thumbs Up
|
97 |
+
rock,Heartburn,Thumbs Up
|
98 |
+
rock,Crazy,Thumbs Down
|
99 |
+
rock,Hurry Up And Come,Thumbs Up
|
100 |
+
rock,Hotel,Thumbs Down
|
101 |
+
rock,If I Ain't Got You,Thumbs Up
|
102 |
+
rock,Heartburn,Thumbs Up
|
103 |
+
rock,Crazy,Thumbs Down
|
104 |
+
rock,Hurry Up And Come,Thumbs Up
|
105 |
+
rock,Hotel,Thumbs Down
|
106 |
+
rock,If I Ain't Got You,Thumbs Up
|
107 |
+
rock,Heartburn,Thumbs Down
|
108 |
+
rock,Crazy,Thumbs Up
|
109 |
+
rock,Hurry Up And Come,Thumbs Down
|
110 |
+
rock,Hotel,Thumbs Down
|
111 |
+
rock,If I Ain't Got You,Thumbs Up
|