Spaces:
Running on Zero
Running on Zero
replace config inside generation function
Browse files
app.py
CHANGED
|
@@ -83,16 +83,17 @@ with gr.Blocks(title="RFD3 Test") as demo:
|
|
| 83 |
maximum=200
|
| 84 |
)
|
| 85 |
# Configure RFD3 inference
|
| 86 |
-
config = RFD3InferenceConfig(
|
| 87 |
-
specification={
|
| 88 |
-
'length': length,
|
| 89 |
|
| 90 |
-
},
|
| 91 |
-
diffusion_batch_size=num_designs_per_batch, # Generate 2 structures per batch
|
| 92 |
-
)
|
| 93 |
|
| 94 |
# Initialize engine and run generation
|
| 95 |
def unconditional_generation(num_batches, num_designs_per_batch, length):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
try:
|
| 97 |
model = RFD3InferenceEngine(**config)
|
| 98 |
outputs = model.run(
|
|
|
|
| 83 |
maximum=200
|
| 84 |
)
|
| 85 |
# Configure RFD3 inference
|
|
|
|
|
|
|
|
|
|
| 86 |
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
# Initialize engine and run generation
|
| 89 |
def unconditional_generation(num_batches, num_designs_per_batch, length):
|
| 90 |
+
|
| 91 |
+
config = RFD3InferenceConfig(
|
| 92 |
+
specification={
|
| 93 |
+
'length': length,
|
| 94 |
+
},
|
| 95 |
+
diffusion_batch_size=num_designs_per_batch, # Generate 2 structures per batch
|
| 96 |
+
)
|
| 97 |
try:
|
| 98 |
model = RFD3InferenceEngine(**config)
|
| 99 |
outputs = model.run(
|