Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def response_at_index_i(i):
|
|
49 |
score_1 = df_resps["score_1"][i]
|
50 |
score_2 = df_resps["score_2"][i]
|
51 |
score_3 = df_resps["score_3"][i]
|
52 |
-
meta = f"Reference Answer Index: {df_resps['meta_1'][i]} \
|
53 |
return prompt, response, judgement_1, judgement_2, judgement_3, rubric_1, rubric_2, rubric_3, score_1, score_2, score_3, meta
|
54 |
|
55 |
|
@@ -78,6 +78,10 @@ def prv(num):
|
|
78 |
# create a gradio interface
|
79 |
demo = gr.Blocks(title='Group1_Subtask2')
|
80 |
|
|
|
|
|
|
|
|
|
81 |
# gradio interface
|
82 |
with demo:
|
83 |
|
@@ -95,10 +99,14 @@ with demo:
|
|
95 |
|
96 |
|
97 |
with gr.Row():
|
98 |
-
prv_btn = gr.Button("
|
99 |
-
nxt_btn = gr.Button("
|
100 |
with gr.Row():
|
101 |
listhistory = gr.Textbox(label='Confirmed Response Scores')
|
|
|
|
|
|
|
|
|
102 |
|
103 |
|
104 |
with gr.Row():
|
@@ -118,9 +126,9 @@ with demo:
|
|
118 |
|
119 |
with gr.Row():
|
120 |
|
121 |
-
score_1 = gr.Number("Score 1")
|
122 |
-
score_2 = gr.Number("Score 2")
|
123 |
-
score_3 = gr.Number("Score 3")
|
124 |
|
125 |
with gr.Row():
|
126 |
|
|
|
49 |
score_1 = df_resps["score_1"][i]
|
50 |
score_2 = df_resps["score_2"][i]
|
51 |
score_3 = df_resps["score_3"][i]
|
52 |
+
meta = f"Reference Answer Index: {df_resps['meta_1'][i]} \nFilename: {df_resps['meta_2'][i]}\nPrompt Task: {df_resps['meta_3'][i]}\nPrompt Domain: {df_resps['meta_4'][i]}"
|
53 |
return prompt, response, judgement_1, judgement_2, judgement_3, rubric_1, rubric_2, rubric_3, score_1, score_2, score_3, meta
|
54 |
|
55 |
|
|
|
78 |
# create a gradio interface
|
79 |
demo = gr.Blocks(title='Group1_Subtask2')
|
80 |
|
81 |
+
app_desc = "1. This is a tool that that generates a prompt with corresponding responses, judgements, rubrics and scores. \n\n2. The tool allows users to confirm the scores of the responses. \n\n3. The tool also allows users to navigate through the prompts."
|
82 |
+
|
83 |
+
how_to_use = "1. Start by clicking NEXT or PREVIOUS to start viewing results.\n\n2. For a given generated result, you can confirm score 1, score 2 and score 3.\n\n3. Click on 'Submit Your Response' to confirm the scores.\n\n4. You can navigate through the results by clicking on NEXT or PREVIOUS.\n\n5. The tool also shows the confirmed scores for each response.\n\nNB//The Confirmed Response Scores and Confirm Scores buttons do not update automatically. You need to click on the Submit Your Response button to update the confirmed scores."
|
84 |
+
|
85 |
# gradio interface
|
86 |
with demo:
|
87 |
|
|
|
99 |
|
100 |
|
101 |
with gr.Row():
|
102 |
+
prv_btn = gr.Button("PREVIOUS")
|
103 |
+
nxt_btn = gr.Button("NEXT")
|
104 |
with gr.Row():
|
105 |
listhistory = gr.Textbox(label='Confirmed Response Scores')
|
106 |
+
with gr.Row():
|
107 |
+
app_description = gr.Textbox(value=app_desc, label='App Description')
|
108 |
+
with gr.Row():
|
109 |
+
how_to_use = gr.Textbox(value=how_to_use, label='How to Use')
|
110 |
|
111 |
|
112 |
with gr.Row():
|
|
|
126 |
|
127 |
with gr.Row():
|
128 |
|
129 |
+
score_1 = gr.Number(label="Score 1")
|
130 |
+
score_2 = gr.Number(label="Score 2")
|
131 |
+
score_3 = gr.Number(label="Score 3")
|
132 |
|
133 |
with gr.Row():
|
134 |
|