Update
Browse files
app.py
CHANGED
@@ -212,30 +212,32 @@ with demo:
|
|
212 |
gr.Dataframe(unique_bugs_df)
|
213 |
|
214 |
# with gr.Tab("π Inspect"):
|
215 |
-
fixed_bug_title_id_pairs = [(bug_id_to_title[bug_id], bug_id) for bug_id in sorted(fixed_bug_ids)]
|
216 |
with gr.Row():
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
bug_id, f"Not Available (method = {method}, bug_id = {bug_id})"
|
227 |
),
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
)
|
232 |
-
inspect_fix.change(
|
233 |
-
fn=lambda bug_id, method: bug_ids_to_patches.get(method, dict()).get(
|
234 |
-
bug_id, f"Not Available (method = {method}, bug_id = {bug_id})"
|
235 |
-
),
|
236 |
-
inputs=[inspect_issue, inspect_fix],
|
237 |
-
outputs=[method_patch],
|
238 |
-
)
|
239 |
|
240 |
# with gr.Tab("π Submission"):
|
241 |
gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
|
|
|
212 |
gr.Dataframe(unique_bugs_df)
|
213 |
|
214 |
# with gr.Tab("π Inspect"):
|
|
|
215 |
with gr.Row():
|
216 |
+
fixed_bug_title_id_pairs = [(bug_id_to_title[bug_id], bug_id) for bug_id in sorted(fixed_bug_ids)]
|
217 |
+
with gr.Column():
|
218 |
+
inspect_issue = gr.Dropdown(fixed_bug_title_id_pairs, label="Inspct Issue", interactive=True)
|
219 |
+
golden_patch = gr.Code("", language="cpp", label="Golden Patch")
|
220 |
+
|
221 |
+
with gr.Column():
|
222 |
+
inspect_fix = gr.Dropdown(list(bug_ids_to_patches.keys()), label="Method(Model)", interactive=True)
|
223 |
+
method_patch = gr.Code("", language="cpp", label="APR Patch")
|
224 |
+
inspect_issue.change(
|
225 |
+
fn=lambda bug_id, method: (
|
226 |
+
bug_id_to_patch.get(bug_id, f"Not Available (bug_id = {bug_id})"),
|
227 |
+
bug_ids_to_patches.get(method, dict()).get(
|
228 |
+
bug_id, f"Not Available (method = {method}, bug_id = {bug_id})"
|
229 |
+
),
|
230 |
+
),
|
231 |
+
inputs=[inspect_issue, inspect_fix],
|
232 |
+
outputs=[golden_patch, method_patch],
|
233 |
+
)
|
234 |
+
inspect_fix.change(
|
235 |
+
fn=lambda bug_id, method: bug_ids_to_patches.get(method, dict()).get(
|
236 |
bug_id, f"Not Available (method = {method}, bug_id = {bug_id})"
|
237 |
),
|
238 |
+
inputs=[inspect_issue, inspect_fix],
|
239 |
+
outputs=[method_patch],
|
240 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
|
242 |
# with gr.Tab("π Submission"):
|
243 |
gr.Markdown(EVALUATION_QUEUE_TEXT, elem_classes="markdown-text")
|