Update
Browse files
app.py
CHANGED
@@ -211,7 +211,11 @@ with demo:
|
|
211 |
inspect_issue = gr.Dropdown(fixed_bug_title_id_pairs, label="Inspct Issue", interactive=True)
|
212 |
golden_patch = gr.Code("", language="cpp", label="Golden Patch")
|
213 |
inspect_issue.change(
|
214 |
-
fn=lambda bug_id:
|
|
|
|
|
|
|
|
|
215 |
inputs=inspect_issue,
|
216 |
outputs=golden_patch,
|
217 |
)
|
|
|
211 |
inspect_issue = gr.Dropdown(fixed_bug_title_id_pairs, label="Inspct Issue", interactive=True)
|
212 |
golden_patch = gr.Code("", language="cpp", label="Golden Patch")
|
213 |
inspect_issue.change(
|
214 |
+
fn=lambda bug_id: (
|
215 |
+
dataset["test"][bug_id]["patch"]
|
216 |
+
if bug_id in dataset["test"]
|
217 |
+
else f"Not Available (bug_id = {bug_id})"
|
218 |
+
),
|
219 |
inputs=inspect_issue,
|
220 |
outputs=golden_patch,
|
221 |
)
|