Spaces:
Running on Zero
Running on Zero
expose file list
Browse files- utils/pipelines.py +5 -6
utils/pipelines.py
CHANGED
|
@@ -4,6 +4,7 @@ from lightning.fabric import seed_everything
|
|
| 4 |
import time
|
| 5 |
import os
|
| 6 |
import spaces
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
@spaces.GPU(duration=300)
|
|
@@ -65,12 +66,10 @@ def unconditional_generation(num_batches, num_designs_per_batch, length):
|
|
| 65 |
n_batches=num_batches, # Generate 1 batch
|
| 66 |
)
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
# #return_str += struct.atom_array
|
| 73 |
-
return directory
|
| 74 |
|
| 75 |
except Exception as e:
|
| 76 |
return f"Error: {str(e)}"
|
|
|
|
| 4 |
import time
|
| 5 |
import os
|
| 6 |
import spaces
|
| 7 |
+
import subprocess
|
| 8 |
|
| 9 |
|
| 10 |
@spaces.GPU(duration=300)
|
|
|
|
| 66 |
n_batches=num_batches, # Generate 1 batch
|
| 67 |
)
|
| 68 |
|
| 69 |
+
cmd = f"ls -R {directory}"
|
| 70 |
+
file_list = subprocess.check_output(cmd, shell=True).decode()
|
| 71 |
+
|
| 72 |
+
return file_list
|
|
|
|
|
|
|
| 73 |
|
| 74 |
except Exception as e:
|
| 75 |
return f"Error: {str(e)}"
|