Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,8 @@ def feedback_response(input_message, feedback, comments):
|
|
58 |
# Update Google Sheets
|
59 |
sh = gc.open_by_key(sheet_id)
|
60 |
worksheet = sh.worksheet(worksheet_name)
|
61 |
-
|
|
|
62 |
# Append the data to the worksheet only if comments have a value
|
63 |
if comments:
|
64 |
# Create a DataFrame from the response and additional comments
|
@@ -66,9 +67,10 @@ def feedback_response(input_message, feedback, comments):
|
|
66 |
|
67 |
# Append the data to the worksheet
|
68 |
worksheet.append_rows(df.values.tolist())
|
|
|
69 |
|
70 |
-
|
71 |
-
return
|
72 |
|
73 |
# Set up the Gradio Interface
|
74 |
feedback_interface = gr.Interface(
|
@@ -105,7 +107,7 @@ feedback_interface = gr.Interface(
|
|
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
|
|
|
58 |
# Update Google Sheets
|
59 |
sh = gc.open_by_key(sheet_id)
|
60 |
worksheet = sh.worksheet(worksheet_name)
|
61 |
+
|
62 |
+
"Thank you for your feedback. Your response and feedback has been recorded!" = "Thank you for your feedback. Your response and feedback has been recorded!"
|
63 |
# Append the data to the worksheet only if comments have a value
|
64 |
if comments:
|
65 |
# Create a DataFrame from the response and additional comments
|
|
|
67 |
|
68 |
# Append the data to the worksheet
|
69 |
worksheet.append_rows(df.values.tolist())
|
70 |
+
initial_response = "Thank you for your feedback. Your response and feedback has been recorded!"
|
71 |
|
72 |
+
|
73 |
+
return initial_response, elapsed_time # Return the initial_response and elapsed_time
|
74 |
|
75 |
# Set up the Gradio Interface
|
76 |
feedback_interface = gr.Interface(
|
|
|
107 |
** DISCLAIMER: You have to type a input message, click on the feedback buttons, and type in additional comments for your responses to be recorded
|
108 |
|
109 |
** For further questions contact LEAR Labs!
|
110 |
+
"""
|
111 |
)
|
112 |
|
113 |
# Launch the interface
|