Spaces:
Running
Running
Feat: Change confidence scale
Browse files
app.py
CHANGED
@@ -287,7 +287,7 @@ def load_example(index):
|
|
287 |
|
288 |
# If the user already made an annotation for this example, gradio will return said annotation
|
289 |
previous_annotation = (
|
290 |
-
annotations.iloc[index].to_dict() if index < len(annotations) else {"sample_id": row["sample_id"], "emotion": 'Blank', "confidence":
|
291 |
"comments": '', "n_clicks": 0}
|
292 |
)
|
293 |
|
@@ -355,7 +355,7 @@ def deactivate_participant_id(participant_id, lets_go, total, previous_button, n
|
|
355 |
participant_id = gr.Textbox(label='What is your participant ID?', value = participant_id, interactive = False)
|
356 |
lets_go = gr.Button("Participant selected!", interactive = False)
|
357 |
emotions = gr.Radio(["Blank", "Joy", "Sad", "Angry", "Neutral"], label="Predominant Emotion", value = emotions, visible = True)
|
358 |
-
confidence = gr.
|
359 |
comments = gr.Textbox(label="Comments", visible =True, value = comments)
|
360 |
previous_button = gr.Button("Previous Example", visible = True)
|
361 |
next_button = gr.Button("Next Example",visible = True)
|
@@ -438,7 +438,7 @@ with (gr.Blocks(theme=gr.themes.Soft(), css = css) as demo):
|
|
438 |
emotions = gr.Radio(["Blank", "Joy", "Sad", "Angry", "Neutral"], label="Predominant Emotion", value = "Blank", visible = False)
|
439 |
|
440 |
with gr.Row():
|
441 |
-
confidence = gr.
|
442 |
|
443 |
with gr.Row():
|
444 |
# Comment section
|
|
|
287 |
|
288 |
# If the user already made an annotation for this example, gradio will return said annotation
|
289 |
previous_annotation = (
|
290 |
+
annotations.iloc[index].to_dict() if index < len(annotations) else {"sample_id": row["sample_id"], "emotion": 'Blank', "confidence": 'Blank',
|
291 |
"comments": '', "n_clicks": 0}
|
292 |
)
|
293 |
|
|
|
355 |
participant_id = gr.Textbox(label='What is your participant ID?', value = participant_id, interactive = False)
|
356 |
lets_go = gr.Button("Participant selected!", interactive = False)
|
357 |
emotions = gr.Radio(["Blank", "Joy", "Sad", "Angry", "Neutral"], label="Predominant Emotion", value = emotions, visible = True)
|
358 |
+
confidence = gr.Radio(["Blank","Very Uncertain", "Somewhat Uncertain", "Neutral", "Somewhat confident", "Very confident"], label="How confident are you that the annotated emotion is present in the recording?", visible = True, value = confidence)
|
359 |
comments = gr.Textbox(label="Comments", visible =True, value = comments)
|
360 |
previous_button = gr.Button("Previous Example", visible = True)
|
361 |
next_button = gr.Button("Next Example",visible = True)
|
|
|
438 |
emotions = gr.Radio(["Blank", "Joy", "Sad", "Angry", "Neutral"], label="Predominant Emotion", value = "Blank", visible = False)
|
439 |
|
440 |
with gr.Row():
|
441 |
+
confidence = gr.Radio(["Blank","Very Uncertain", "Somewhat Uncertain", "Neutral", "Somewhat confident", "Very confident"], label="How confident are you that the annotated emotion is present in the recording?", visible = False)
|
442 |
|
443 |
with gr.Row():
|
444 |
# Comment section
|