Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -99,23 +99,22 @@ feedback_interface = gr.Interface(
|
|
99 |
# Step by Step Introduction
|
100 |
1. Place a question in the input message textbox
|
101 |
2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right
|
102 |
-
3. After looking at the results,
|
103 |
4. After choosing the best option, write down additional comments for more feedback
|
104 |
5. Press submit again and wait for the output to come out again for your feedback to be submitted
|
105 |
6. Once the "Thank you for your feedback. Your response and feedback have been recorded!" message is shown, you are done
|
106 |
|
107 |
-
** DISCLAIMER: You have to type an input message,
|
108 |
|
109 |
** For further questions contact LEAR Labs!
|
110 |
"""
|
111 |
)
|
112 |
|
113 |
-
# Define a function for response submission
|
114 |
def submit_response():
|
115 |
input_message = feedback_interface.inputs[0].value
|
116 |
feedback_interface.outputs[0].value, feedback_interface.outputs[1].value = feedback_response(input_message, "", "")
|
117 |
|
118 |
-
# Define a function for feedback submission
|
119 |
def submit_feedback():
|
120 |
input_message = feedback_interface.inputs[0].value
|
121 |
feedback = feedback_interface.inputs[1].value
|
@@ -123,8 +122,12 @@ def submit_feedback():
|
|
123 |
feedback_interface.outputs[0].value, feedback_interface.outputs[1].value = feedback_response(input_message, feedback, comments)
|
124 |
|
125 |
# Create separate buttons for response and feedback submission
|
126 |
-
response_button = gr.Button(value="Submit Response"
|
127 |
-
feedback_button = gr.Button(value="Submit Feedback"
|
|
|
|
|
|
|
|
|
128 |
|
129 |
# Launch the interface with buttons
|
130 |
-
feedback_interface.launch([response_button, feedback_button])
|
|
|
99 |
# Step by Step Introduction
|
100 |
1. Place a question in the input message textbox
|
101 |
2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right
|
102 |
+
3. After looking at the results, select the feedback option that best describes the output: Informative, Inaccurate, Nonsense
|
103 |
4. After choosing the best option, write down additional comments for more feedback
|
104 |
5. Press submit again and wait for the output to come out again for your feedback to be submitted
|
105 |
6. Once the "Thank you for your feedback. Your response and feedback have been recorded!" message is shown, you are done
|
106 |
|
107 |
+
** DISCLAIMER: You have to type an input message, select a feedback option, and type in additional comments for your responses to be recorded
|
108 |
|
109 |
** For further questions contact LEAR Labs!
|
110 |
"""
|
111 |
)
|
112 |
|
113 |
+
# Define a function for response and feedback submission
|
114 |
def submit_response():
|
115 |
input_message = feedback_interface.inputs[0].value
|
116 |
feedback_interface.outputs[0].value, feedback_interface.outputs[1].value = feedback_response(input_message, "", "")
|
117 |
|
|
|
118 |
def submit_feedback():
|
119 |
input_message = feedback_interface.inputs[0].value
|
120 |
feedback = feedback_interface.inputs[1].value
|
|
|
122 |
feedback_interface.outputs[0].value, feedback_interface.outputs[1].value = feedback_response(input_message, feedback, comments)
|
123 |
|
124 |
# Create separate buttons for response and feedback submission
|
125 |
+
response_button = gr.Button(value="Submit Response")
|
126 |
+
feedback_button = gr.Button(value="Submit Feedback")
|
127 |
+
|
128 |
+
# Set the click actions for the buttons
|
129 |
+
response_button.click(submit_response)
|
130 |
+
feedback_button.click(submit_feedback)
|
131 |
|
132 |
# Launch the interface with buttons
|
133 |
+
feedback_interface.launch([response_button, feedback_button], share=True)
|