Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,7 +67,8 @@ def feedback_response(input_message, feedback, comments):
|
|
| 67 |
# Append the data to the worksheet
|
| 68 |
worksheet.append_rows(df.values.tolist())
|
| 69 |
|
| 70 |
-
|
|
|
|
| 71 |
|
| 72 |
# Set up the Gradio Interface
|
| 73 |
feedback_interface = gr.Interface(
|
|
@@ -89,7 +90,22 @@ feedback_interface = gr.Interface(
|
|
| 89 |
gr.Textbox(label="Elapsed Time (s)", type="text") # Change the type to "text" for two decimal places
|
| 90 |
],
|
| 91 |
title="Beta: Itell Guide Response Bot",
|
| 92 |
-
description="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
)
|
| 94 |
|
| 95 |
# Launch the interface
|
|
|
|
| 67 |
# Append the data to the worksheet
|
| 68 |
worksheet.append_rows(df.values.tolist())
|
| 69 |
|
| 70 |
+
thankyou = "Thank you for your feedback. Your response and feedback has been recorded!"
|
| 71 |
+
return thankyou, elapsed_time # Return the initial_response and elapsed_time
|
| 72 |
|
| 73 |
# Set up the Gradio Interface
|
| 74 |
feedback_interface = gr.Interface(
|
|
|
|
| 90 |
gr.Textbox(label="Elapsed Time (s)", type="text") # Change the type to "text" for two decimal places
|
| 91 |
],
|
| 92 |
title="Beta: Itell Guide Response Bot",
|
| 93 |
+
description="""
|
| 94 |
+
# Introduction
|
| 95 |
+
This is an interface to test iTELL's guide on the side. Please be aware that responses can take up to 20 seconds
|
| 96 |
+
|
| 97 |
+
# Step by Step Introduction
|
| 98 |
+
1. Place a educational python-related question in the input message textbox
|
| 99 |
+
2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right
|
| 100 |
+
3. After looking at the results, click on the feedback options that best describes the output: Informative, Inaccurate, Nonsense
|
| 101 |
+
4. After choosing the best option, write down additional comments for more feedback
|
| 102 |
+
5. Press submit again and wait for the output to come out again for your feedback to be submitted
|
| 103 |
+
6. Once the "Thank you for your feedback. Your response and feedback has been recorded!" message is shown, you are done
|
| 104 |
+
|
| 105 |
+
** DISCLAIMER: You have to type a input message, click on the feedback buttons, and type in additional comments for your responses to be recorded
|
| 106 |
+
|
| 107 |
+
** For further questions contact LEAR Labs!
|
| 108 |
+
""",
|
| 109 |
)
|
| 110 |
|
| 111 |
# Launch the interface
|