Spaces:
Running
on
Zero
Running
on
Zero
replace pdb with pdb_path var
Browse files- utils/handle_events.py +1 -1
utils/handle_events.py
CHANGED
|
@@ -50,7 +50,7 @@ def show_pdb(batch, design, result):
|
|
| 50 |
"""
|
| 51 |
if batch is None or design is None:
|
| 52 |
return gr.update()
|
| 53 |
-
pdb_path= next(d["
|
| 54 |
with open(pdb_path, 'r') as f:
|
| 55 |
pdb_str = f.read()
|
| 56 |
return gr.update(value=f"Selected Batch: {batch}, Design: {design}, saved at {pdb_str}:\n {pdb_str}", visible=True)
|
|
|
|
| 50 |
"""
|
| 51 |
if batch is None or design is None:
|
| 52 |
return gr.update()
|
| 53 |
+
pdb_path= next(d["pdb_path"] for d in result if d["batch"] == int(batch) and d["design"] == int(design))
|
| 54 |
with open(pdb_path, 'r') as f:
|
| 55 |
pdb_str = f.read()
|
| 56 |
return gr.update(value=f"Selected Batch: {batch}, Design: {design}, saved at {pdb_str}:\n {pdb_str}", visible=True)
|