Spaces:
Sleeping
Sleeping
Naisong Zhou
commited on
Commit
·
a57aef3
1
Parent(s):
e426a7f
disable user editing in llm-involved blocks
Browse files
app.py
CHANGED
|
@@ -210,7 +210,7 @@ if __name__ == "__main__":
|
|
| 210 |
with gr.Row():
|
| 211 |
submit_btn = gr.Button("Submit & See AI Output")
|
| 212 |
with gr.Row():
|
| 213 |
-
ai_output = gr.Textbox(label="AI Output")
|
| 214 |
session_index = gr.Number(label="Session Index", visible=False)
|
| 215 |
|
| 216 |
submit_btn.click(
|
|
@@ -223,7 +223,7 @@ if __name__ == "__main__":
|
|
| 223 |
# evaluate same for every group
|
| 224 |
#evaluate_btn = gr.Button("Evaluate", visible=False)
|
| 225 |
# Evaluate without showing
|
| 226 |
-
evaluation_result = gr.Textbox(label="Evaluation Result", visible=False)
|
| 227 |
|
| 228 |
ai_output.change(
|
| 229 |
fn=lambda session_index: evaluate_interaction(session_index, session_manager, api_key),
|
|
@@ -251,7 +251,7 @@ if __name__ == "__main__":
|
|
| 251 |
with gr.Row():
|
| 252 |
create_initial_btn = gr.Button("Create")
|
| 253 |
with gr.Row():
|
| 254 |
-
initial_answer = gr.Textbox(label="AI Output")
|
| 255 |
with gr.Row():
|
| 256 |
modification_suggestions = gr.Textbox(label="Enter each idea on a new line, starting with '1', '2', and '3' (use Shift+Enter for new lines)", placeholder="Please propose 3 ideas to help Airbnb’s business model align with 17 SDGs (At least 50 words)")
|
| 257 |
word_count_display_b = gr.Label(value="Word count: 0")
|
|
@@ -260,7 +260,7 @@ if __name__ == "__main__":
|
|
| 260 |
with gr.Row():
|
| 261 |
create_final_btn = gr.Button("Review")
|
| 262 |
with gr.Row():
|
| 263 |
-
final_answer = gr.Textbox(label="Final Answer")
|
| 264 |
session_index = gr.Number(label="Session Index", visible=False)
|
| 265 |
|
| 266 |
|
|
@@ -283,7 +283,7 @@ if __name__ == "__main__":
|
|
| 283 |
|
| 284 |
|
| 285 |
#evaluate_btn = gr.Button("Evaluate")
|
| 286 |
-
evaluation_result = gr.Textbox(label="Evaluation Result", visible=False)
|
| 287 |
|
| 288 |
final_answer.change(
|
| 289 |
fn=lambda session_index: evaluate_interaction(session_index, session_manager, api_key),
|
|
@@ -315,11 +315,11 @@ if __name__ == "__main__":
|
|
| 315 |
with gr.Row():
|
| 316 |
create_btn = gr.Button("Submit & See AI Output")
|
| 317 |
with gr.Row():
|
| 318 |
-
ai_initial_output = gr.Textbox(label="AI Output Generated Independently")
|
| 319 |
with gr.Row():
|
| 320 |
merge_btn = gr.Button("Merge Using the Second AI")
|
| 321 |
with gr.Row():
|
| 322 |
-
final_output = gr.Textbox(label="Final Merged Output")
|
| 323 |
session_index = gr.Number(label="Session Index", visible=False)
|
| 324 |
|
| 325 |
create_btn.click(
|
|
@@ -336,7 +336,7 @@ if __name__ == "__main__":
|
|
| 336 |
|
| 337 |
|
| 338 |
#evaluate_btn = gr.Button("Evaluate")
|
| 339 |
-
evaluation_result = gr.Textbox(label="Evaluation Result", visible=False)
|
| 340 |
|
| 341 |
final_output.change(
|
| 342 |
fn=lambda session_index: evaluate_interaction(session_index, session_manager, api_key),
|
|
|
|
| 210 |
with gr.Row():
|
| 211 |
submit_btn = gr.Button("Submit & See AI Output")
|
| 212 |
with gr.Row():
|
| 213 |
+
ai_output = gr.Textbox(label="AI Output", interactive=False)
|
| 214 |
session_index = gr.Number(label="Session Index", visible=False)
|
| 215 |
|
| 216 |
submit_btn.click(
|
|
|
|
| 223 |
# evaluate same for every group
|
| 224 |
#evaluate_btn = gr.Button("Evaluate", visible=False)
|
| 225 |
# Evaluate without showing
|
| 226 |
+
evaluation_result = gr.Textbox(label="Evaluation Result", visible=False, interactive = False)
|
| 227 |
|
| 228 |
ai_output.change(
|
| 229 |
fn=lambda session_index: evaluate_interaction(session_index, session_manager, api_key),
|
|
|
|
| 251 |
with gr.Row():
|
| 252 |
create_initial_btn = gr.Button("Create")
|
| 253 |
with gr.Row():
|
| 254 |
+
initial_answer = gr.Textbox(label="AI Output", interactive=False)
|
| 255 |
with gr.Row():
|
| 256 |
modification_suggestions = gr.Textbox(label="Enter each idea on a new line, starting with '1', '2', and '3' (use Shift+Enter for new lines)", placeholder="Please propose 3 ideas to help Airbnb’s business model align with 17 SDGs (At least 50 words)")
|
| 257 |
word_count_display_b = gr.Label(value="Word count: 0")
|
|
|
|
| 260 |
with gr.Row():
|
| 261 |
create_final_btn = gr.Button("Review")
|
| 262 |
with gr.Row():
|
| 263 |
+
final_answer = gr.Textbox(label="Final Answer", interactive=False)
|
| 264 |
session_index = gr.Number(label="Session Index", visible=False)
|
| 265 |
|
| 266 |
|
|
|
|
| 283 |
|
| 284 |
|
| 285 |
#evaluate_btn = gr.Button("Evaluate")
|
| 286 |
+
evaluation_result = gr.Textbox(label="Evaluation Result", visible=False, interactive=False)
|
| 287 |
|
| 288 |
final_answer.change(
|
| 289 |
fn=lambda session_index: evaluate_interaction(session_index, session_manager, api_key),
|
|
|
|
| 315 |
with gr.Row():
|
| 316 |
create_btn = gr.Button("Submit & See AI Output")
|
| 317 |
with gr.Row():
|
| 318 |
+
ai_initial_output = gr.Textbox(label="AI Output Generated Independently", interactive=False)
|
| 319 |
with gr.Row():
|
| 320 |
merge_btn = gr.Button("Merge Using the Second AI")
|
| 321 |
with gr.Row():
|
| 322 |
+
final_output = gr.Textbox(label="Final Merged Output", interactive=False)
|
| 323 |
session_index = gr.Number(label="Session Index", visible=False)
|
| 324 |
|
| 325 |
create_btn.click(
|
|
|
|
| 336 |
|
| 337 |
|
| 338 |
#evaluate_btn = gr.Button("Evaluate")
|
| 339 |
+
evaluation_result = gr.Textbox(label="Evaluation Result", visible=False, interactive = False)
|
| 340 |
|
| 341 |
final_output.change(
|
| 342 |
fn=lambda session_index: evaluate_interaction(session_index, session_manager, api_key),
|