Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,7 +71,7 @@ def feedback_response(input_message, feedback, add_feedback, comments):
|
|
| 71 |
sh = gc.open_by_key(sheet_id)
|
| 72 |
worksheet = sh.worksheet(worksheet_name)
|
| 73 |
|
| 74 |
-
thankyou = "Thank you for your feedback. Your response and feedback
|
| 75 |
# Append the data to the worksheet only if comments have a value
|
| 76 |
if comments:
|
| 77 |
# Create a DataFrame from the response and additional comments
|
|
@@ -88,16 +88,8 @@ feedback_interface = gr.Interface(
|
|
| 88 |
fn=feedback_response,
|
| 89 |
inputs=[
|
| 90 |
gr.Textbox(label="Input Message"),
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
gr.Radio("Bad", label="Bad"),
|
| 94 |
-
gr.Radio("Inappropriate", label="Inappropriate")
|
| 95 |
-
),
|
| 96 |
-
gr.Row(
|
| 97 |
-
gr.Radio("Informative", label="Informative"),
|
| 98 |
-
gr.Radio("Inaccurate", label="Inaccurate"),
|
| 99 |
-
gr.Radio("Nonsense", label="Nonsense")
|
| 100 |
-
),
|
| 101 |
gr.Textbox(label="Additional Comments")
|
| 102 |
],
|
| 103 |
outputs=[
|
|
@@ -112,12 +104,12 @@ feedback_interface = gr.Interface(
|
|
| 112 |
# Step by Step Introduction
|
| 113 |
1. Place a question in the input message textbox
|
| 114 |
2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right
|
| 115 |
-
3. After looking at the results, click on the feedback options that best
|
| 116 |
4. After choosing the best option, write down additional comments for more feedback
|
| 117 |
5. Press submit again and wait for the output to come out again for your feedback to be submitted
|
| 118 |
-
6. Once the "Thank you for your feedback. Your response and feedback
|
| 119 |
|
| 120 |
-
** DISCLAIMER: You have to type
|
| 121 |
|
| 122 |
** For further questions contact LEAR Labs!
|
| 123 |
"""
|
|
@@ -125,4 +117,3 @@ feedback_interface = gr.Interface(
|
|
| 125 |
|
| 126 |
# Launch the interface
|
| 127 |
feedback_interface.launch()
|
| 128 |
-
|
|
|
|
| 71 |
sh = gc.open_by_key(sheet_id)
|
| 72 |
worksheet = sh.worksheet(worksheet_name)
|
| 73 |
|
| 74 |
+
thankyou = "Thank you for your feedback. Your response and feedback have been recorded!"
|
| 75 |
# Append the data to the worksheet only if comments have a value
|
| 76 |
if comments:
|
| 77 |
# Create a DataFrame from the response and additional comments
|
|
|
|
| 88 |
fn=feedback_response,
|
| 89 |
inputs=[
|
| 90 |
gr.Textbox(label="Input Message"),
|
| 91 |
+
"Good\nBad\nInappropriate",
|
| 92 |
+
"Informative\nInaccurate\nNonsense",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
gr.Textbox(label="Additional Comments")
|
| 94 |
],
|
| 95 |
outputs=[
|
|
|
|
| 104 |
# Step by Step Introduction
|
| 105 |
1. Place a question in the input message textbox
|
| 106 |
2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right
|
| 107 |
+
3. After looking at the results, click on the feedback options that best describe the output: Informative, Inaccurate, Nonsense
|
| 108 |
4. After choosing the best option, write down additional comments for more feedback
|
| 109 |
5. Press submit again and wait for the output to come out again for your feedback to be submitted
|
| 110 |
+
6. Once the "Thank you for your feedback. Your response and feedback have been recorded!" message is shown, you are done
|
| 111 |
|
| 112 |
+
** DISCLAIMER: You have to type an input message, click on the feedback buttons, and type in additional comments for your responses to be recorded
|
| 113 |
|
| 114 |
** For further questions contact LEAR Labs!
|
| 115 |
"""
|
|
|
|
| 117 |
|
| 118 |
# Launch the interface
|
| 119 |
feedback_interface.launch()
|
|
|