Spaces:
Sleeping
Sleeping
Spark Chou
commited on
Commit
·
3620b6d
1
Parent(s):
76578a8
app.py
CHANGED
|
@@ -858,79 +858,82 @@ with gr.Blocks(theme=gr.themes.Soft(), css=".gradio-container {max-width: 960px
|
|
| 858 |
}
|
| 859 |
|
| 860 |
with welcome_page:
|
| 861 |
-
gr.Markdown("#
|
| 862 |
start_btn = gr.Button("Start", variant="primary")
|
| 863 |
|
| 864 |
with info_page:
|
| 865 |
-
gr.Markdown("##
|
| 866 |
-
username_input = gr.Textbox(label="
|
| 867 |
-
age_input = gr.Radio(["18
|
| 868 |
-
gender_input = gr.Radio(["
|
| 869 |
-
education_input = gr.Radio(["
|
| 870 |
-
education_other_input = gr.Textbox(label="
|
| 871 |
-
ai_experience_input = gr.Radio([
|
| 872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 873 |
|
| 874 |
-
with sample_page:
|
| 875 |
|
| 876 |
-
|
| 877 |
-
|
|
|
|
| 878 |
with gr.Row():
|
| 879 |
with gr.Column(scale=1):
|
| 880 |
-
sample_audio = gr.Audio(label="
|
| 881 |
with gr.Column(scale=2):
|
| 882 |
with gr.Column(visible=True) as interactive_view:
|
| 883 |
-
gr.Markdown("####
|
| 884 |
sample_sliders = [gr.Slider(minimum=0, maximum=5, step=1, label=f"Sub-dim {i+1}", visible=False, interactive=True) for i in range(MAX_SUB_DIMS)]
|
| 885 |
with gr.Column(visible=False) as reference_view:
|
| 886 |
-
gr.Markdown("###
|
| 887 |
reference_sliders = [gr.Slider(minimum=0, maximum=5, step=1, label=f"Sub-dim {i+1}", visible=False, interactive=False) for i in range(MAX_SUB_DIMS)]
|
| 888 |
with gr.Row():
|
| 889 |
-
reference_btn = gr.Button("
|
| 890 |
-
go_to_pretest_btn = gr.Button("
|
| 891 |
|
| 892 |
with pretest_page:
|
| 893 |
-
gr.Markdown("##
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
"- 我们希望您能判断每个维度上**回应者**的表现是**偏向人还是机器**,分数的大小反映回应者的语音类人的程度,而**不是**这个维度体现的程度多少\n(如读音正确也不代表是人类,读音错误也不代表是机器,您应当判断的是“听到的发音更偏向机器还是人类”)\n"
|
| 907 |
-
"- 即使您一开始就已经很肯定回应方的身份,同样应当**独立地**对每个维度上回应方的表现进行细致的评判。比如您很肯定回应方是机器,也需要独立地对每个维度判断,而非简单地将每个维度归为偏机器。")
|
| 908 |
-
go_to_test_btn = gr.Button("开始测试", variant="primary")
|
| 909 |
|
|
|
|
|
|
|
|
|
|
| 910 |
with test_page:
|
| 911 |
-
gr.Markdown("##
|
| 912 |
question_progress_text = gr.Markdown()
|
| 913 |
test_dimension_title = gr.Markdown()
|
| 914 |
-
test_audio = gr.Audio(label="
|
| 915 |
-
gr.Markdown("--- \n ###
|
| 916 |
-
|
| 917 |
-
test_sliders = [gr.Slider(minimum=0, maximum=5, step=1, label=f"Sub-dim {i+1}", visible=False, interactive=True, show_label = True) for i in range(MAX_SUB_DIMS)]
|
| 918 |
-
|
| 919 |
with gr.Row():
|
| 920 |
-
prev_dim_btn = gr.Button("
|
| 921 |
-
next_dim_btn = gr.Button("
|
| 922 |
|
| 923 |
with final_judgment_page:
|
| 924 |
-
gr.Markdown("##
|
| 925 |
-
gr.Markdown("
|
| 926 |
-
final_human_robot_radio = gr.Radio(["👤
|
| 927 |
-
submit_final_answer_btn = gr.Button("
|
| 928 |
|
| 929 |
with result_page:
|
| 930 |
-
gr.Markdown("##
|
| 931 |
result_text = gr.Markdown()
|
| 932 |
-
back_to_welcome_btn = gr.Button("
|
| 933 |
-
|
| 934 |
# ==============================================================================
|
| 935 |
# 事件绑定 (Event Binding) & IO 列表定义
|
| 936 |
# ==============================================================================
|
|
|
|
| 858 |
}
|
| 859 |
|
| 860 |
with welcome_page:
|
| 861 |
+
gr.Markdown("# Can you spot the hidden AI?\nListen to the following conversations. Please determine which respondent is an AI.")
|
| 862 |
start_btn = gr.Button("Start", variant="primary")
|
| 863 |
|
| 864 |
with info_page:
|
| 865 |
+
gr.Markdown("## Basic Information")
|
| 866 |
+
username_input = gr.Textbox(label="Username", placeholder="Please enter your nickname")
|
| 867 |
+
age_input = gr.Radio(["Under 18", "18-25", "26-35", "36-50", "Over 50"], label="Age")
|
| 868 |
+
gender_input = gr.Radio(["Male", "Female", "Other"], label="Gender")
|
| 869 |
+
education_input = gr.Radio(["High school or below", "Bachelor", "Master", "PhD", "Other (please specify)"], label="Education Level")
|
| 870 |
+
education_other_input = gr.Textbox(label="Please enter your education", visible=False, interactive=False)
|
| 871 |
+
ai_experience_input = gr.Radio([
|
| 872 |
+
"Never used",
|
| 873 |
+
"Occasionally exposed (e.g., watching others use)",
|
| 874 |
+
"Used a few times, understand basic functions",
|
| 875 |
+
"Use frequently, have some experience",
|
| 876 |
+
"Very familiar, have in-depth experience with multiple AI tools"
|
| 877 |
+
], label="Familiarity with AI Tools")
|
| 878 |
+
submit_info_btn = gr.Button("Submit and Start Learning Sample", variant="primary", interactive=False)
|
| 879 |
|
|
|
|
| 880 |
|
| 881 |
+
with sample_page:
|
| 882 |
+
gr.Markdown("## Sample Analysis\nPlease select a dimension to study and practice scoring. All dimensions share the same sample audio.")
|
| 883 |
+
sample_dimension_selector = gr.Radio(DIMENSION_TITLES, label="Select Learning Dimension", value=DIMENSION_TITLES[0])
|
| 884 |
with gr.Row():
|
| 885 |
with gr.Column(scale=1):
|
| 886 |
+
sample_audio = gr.Audio(label="Sample Audio", value=DIMENSIONS_DATA[0]["audio"])
|
| 887 |
with gr.Column(scale=2):
|
| 888 |
with gr.Column(visible=True) as interactive_view:
|
| 889 |
+
gr.Markdown("#### Please rate the following features (0-5 points. 0 - Feature not present; 1 - Machine; 3 - Neutral; 5 - Human)")
|
| 890 |
sample_sliders = [gr.Slider(minimum=0, maximum=5, step=1, label=f"Sub-dim {i+1}", visible=False, interactive=True) for i in range(MAX_SUB_DIMS)]
|
| 891 |
with gr.Column(visible=False) as reference_view:
|
| 892 |
+
gr.Markdown("### Reference Answer Explanation (1-5 points. 1 = Machine, 5 = Human)")
|
| 893 |
reference_sliders = [gr.Slider(minimum=0, maximum=5, step=1, label=f"Sub-dim {i+1}", visible=False, interactive=False) for i in range(MAX_SUB_DIMS)]
|
| 894 |
with gr.Row():
|
| 895 |
+
reference_btn = gr.Button("Reference")
|
| 896 |
+
go_to_pretest_btn = gr.Button("Got it, start the test", variant="primary")
|
| 897 |
|
| 898 |
with pretest_page:
|
| 899 |
+
gr.Markdown("## Test Instructions\n"
|
| 900 |
+
"- For each question, you need to evaluate **all 5 dimensions**.\n"
|
| 901 |
+
"- Within each dimension, please rate each appearing feature **from 1 to 5**.\n"
|
| 902 |
+
"- **Scoring Guide:**\n"
|
| 903 |
+
" - **0 points: Feature not present**;\n"
|
| 904 |
+
" - **1 point: Strongly machine-like**;\n"
|
| 905 |
+
" - **2 points: Somewhat machine-like**;\n"
|
| 906 |
+
" - **3 points: Neutral**;\n"
|
| 907 |
+
" - **4 points: Somewhat human-like**;\n"
|
| 908 |
+
" - **5 points: Strongly human-like**.\n"
|
| 909 |
+
"- After completing all dimensions, make a **final judgment** on whether the respondent is “Human” or “AI” based on your overall impression.\n"
|
| 910 |
+
"- You can use the “Previous Dimension” and “Next Dimension” buttons to freely switch and modify scores across the 5 dimensions.")
|
| 911 |
+
go_to_test_btn = gr.Button("Start Test", variant="primary")
|
|
|
|
|
|
|
|
|
|
| 912 |
|
| 913 |
+
|
| 914 |
+
|
| 915 |
+
|
| 916 |
with test_page:
|
| 917 |
+
gr.Markdown("## Formal Test")
|
| 918 |
question_progress_text = gr.Markdown()
|
| 919 |
test_dimension_title = gr.Markdown()
|
| 920 |
+
test_audio = gr.Audio(label="Test Audio")
|
| 921 |
+
gr.Markdown("--- \n ### Please rate the respondent (not the initiator) in the conversation based on the following features (0-5 points. 0 - Feature not present; 1 - Machine; 3 - Neutral; 5 - Human)")
|
| 922 |
+
test_sliders = [gr.Slider(minimum=0, maximum=5, step=1, label=f"Sub-dim {i+1}", visible=False, interactive=True) for i in range(MAX_SUB_DIMS)]
|
|
|
|
|
|
|
| 923 |
with gr.Row():
|
| 924 |
+
prev_dim_btn = gr.Button("Previous Dimension")
|
| 925 |
+
next_dim_btn = gr.Button("Next Dimension", variant="primary")
|
| 926 |
|
| 927 |
with final_judgment_page:
|
| 928 |
+
gr.Markdown("## Final Judgment")
|
| 929 |
+
gr.Markdown("You have completed scoring for all dimensions. Please make a final judgment based on your overall impression.")
|
| 930 |
+
final_human_robot_radio = gr.Radio(["👤 Human", "🤖 AI"], label="Please determine the respondent type (required)")
|
| 931 |
+
submit_final_answer_btn = gr.Button("Submit Answer for This Question", variant="primary", interactive=False)
|
| 932 |
|
| 933 |
with result_page:
|
| 934 |
+
gr.Markdown("## Test Completed")
|
| 935 |
result_text = gr.Markdown()
|
| 936 |
+
back_to_welcome_btn = gr.Button("Back to Main Page", variant="primary")
|
|
|
|
| 937 |
# ==============================================================================
|
| 938 |
# 事件绑定 (Event Binding) & IO 列表定义
|
| 939 |
# ==============================================================================
|