jcho02 commited on
Commit
406203d
·
1 Parent(s): 825cd54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -36
app.py CHANGED
@@ -73,42 +73,44 @@ def feedback_response(input_message, feedback, comments):
73
 
74
  return initial_response, elapsed_time # Return the initial_response and elapsed_time
75
 
76
- # Set up the Gradio Interface
77
- feedback_interface = gr.Interface(
78
- fn=feedback_response,
79
- inputs=[
80
- gr.Textbox(label="Input Message"),
81
- gr.Radio(
82
- choices=[
83
- "Informative",
84
- "Inaccurate",
85
- "Nonsense"
86
- ],
87
- label="Feedback"),
88
- gr.Textbox(label="Additional Comments")
89
- ],
90
- outputs=[
91
- gr.Textbox(label="Output", type="text"),
92
- gr.Textbox(label="Elapsed Time (s)", type="text") # Change the type to "text" for two decimal places
93
- ],
94
- title="Beta: Itell Guide Response Bot",
95
- description="""
96
- # Introduction
97
- This is an interface to test iTELL's guide on the side. Please be aware that responses can take up to 20 seconds
98
-
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
  # Create a Blocks context for the buttons
114
  with gr.Blocks() as buttons:
 
73
 
74
  return initial_response, elapsed_time # Return the initial_response and elapsed_time
75
 
76
+ # Create a Blocks context for the interface
77
+ with gr.Blocks() as feedback_interface:
78
+ # Set up the Gradio Interface
79
+ gr.Interface(
80
+ fn=feedback_response,
81
+ inputs=[
82
+ gr.Textbox(label="Input Message"),
83
+ gr.Radio(
84
+ choices=[
85
+ "Informative",
86
+ "Inaccurate",
87
+ "Nonsense"
88
+ ],
89
+ label="Feedback"),
90
+ gr.Textbox(label="Additional Comments")
91
+ ],
92
+ outputs=[
93
+ gr.Textbox(label="Output", type="text"),
94
+ gr.Textbox(label="Elapsed Time (s)", type="text") # Change the type to "text" for two decimal places
95
+ ],
96
+ title="Beta: Itell Guide Response Bot",
97
+ description="""
98
+ # Introduction
99
+ This is an interface to test iTELL's guide on the side. Please be aware that responses can take up to 20 seconds
100
+
101
+ # Step by Step Introduction
102
+ 1. Place a question in the input message textbox
103
+ 2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right
104
+ 3. After looking at the results, select the feedback option that best describes the output: Informative, Inaccurate, Nonsense
105
+ 4. After choosing the best option, write down additional comments for more feedback
106
+ 5. Press submit again and wait for the output to come out again for your feedback to be submitted
107
+ 6. Once the "Thank you for your feedback. Your response and feedback have been recorded!" message is shown, you are done
108
+
109
+ ** DISCLAIMER: You have to type an input message, select a feedback option, and type in additional comments for your responses to be recorded
110
+
111
+ ** For further questions contact LEAR Labs!
112
+ """
113
+ )
114
 
115
  # Create a Blocks context for the buttons
116
  with gr.Blocks() as buttons: