Spaces:
Running
Running
Fixed Feedback
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ with gr.Blocks(title = "CP Helper Bot") as demo:
|
|
38 |
Chat with the bot about the editorial to the problem.
|
39 |
|
40 |
# Feedback
|
41 |
-
Feedback is not logged or stored in any way by the feedback options below the chatbot. Please contact me directly if the bot is broken or for any feedback.
|
42 |
|
43 |
Thanks for using this bot, and I hope you found it helpful!
|
44 |
|
@@ -182,37 +182,37 @@ with gr.Blocks(title = "CP Helper Bot") as demo:
|
|
182 |
|
183 |
msg.submit(cp_helper, [msg, interface, state], [msg, interface, state])
|
184 |
|
185 |
-
def sub_rating(state, option):
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
rating = gr.Dropdown([
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
gr.Interface(sub_rating, [state, rating], [state, rating], allow_flagging=False)
|
203 |
-
|
204 |
-
def sub_feedback(state, message):
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
feedback = gr.Textbox(label = "Submit Feedback")
|
215 |
-
feedback.submit(sub_feedback, [state, feedback], [state, feedback])
|
216 |
|
217 |
|
218 |
|
|
|
38 |
Chat with the bot about the editorial to the problem.
|
39 |
|
40 |
# Feedback
|
41 |
+
Feedback is not logged or stored in any way by the feedback options below the chatbot (which have been removed). Please contact me directly if the bot is broken or for any feedback.
|
42 |
|
43 |
Thanks for using this bot, and I hope you found it helpful!
|
44 |
|
|
|
182 |
|
183 |
msg.submit(cp_helper, [msg, interface, state], [msg, interface, state])
|
184 |
|
185 |
+
# def sub_rating(state, option):
|
186 |
+
# if (state['id'] == None):
|
187 |
+
# return
|
188 |
+
# with open(CHAT_PATH + 'meta', 'a') as f:
|
189 |
+
# f.write(f"{state['id']}: {option}\n")
|
190 |
+
|
191 |
+
# return state, "Choose an Option"
|
192 |
+
|
193 |
+
# rating = gr.Dropdown([
|
194 |
+
# "Choose an Option",
|
195 |
+
# "1 - Very Unhelpful",
|
196 |
+
# "2 - Unhelpful",
|
197 |
+
# "3 - Neutral",
|
198 |
+
# "4 - Helpful",
|
199 |
+
# "5 - Very Helpful"
|
200 |
+
# ], value = "Choose an Option", label='Rate the Conversation')
|
201 |
+
|
202 |
+
# gr.Interface(sub_rating, [state, rating], [state, rating], allow_flagging=False)
|
203 |
+
|
204 |
+
# def sub_feedback(state, message):
|
205 |
+
# if (state['id'] == None):
|
206 |
+
# return
|
207 |
+
# with open(CHAT_PATH + state['id'], 'a') as f:
|
208 |
+
# f.write(f"FEEDBACK: {message}\n\n\n\n")
|
209 |
+
# with open(CHAT_PATH + 'feedback', 'a') as f:
|
210 |
+
# f.write(f"FEEDBACK {state['id']}: {message}\n\n")
|
211 |
+
|
212 |
+
# return state, ""
|
213 |
+
|
214 |
+
# feedback = gr.Textbox(label = "Submit Feedback")
|
215 |
+
# feedback.submit(sub_feedback, [state, feedback], [state, feedback])
|
216 |
|
217 |
|
218 |
|