liuganghuggingface
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -100,6 +100,7 @@ def generate_graph(CH4, CO2, H2, N2, O2, guidance_scale, num_nodes, repeating_ti
|
|
100 |
num_nodes = None if num_nodes == 0 else num_nodes
|
101 |
|
102 |
for _ in range(repeating_time):
|
|
|
103 |
try:
|
104 |
model.to(device)
|
105 |
generated_molecule, img_list = model.generate(properties, guide_scale=guidance_scale, num_nodes=num_nodes, number_chain_steps=num_chain_steps)
|
@@ -275,7 +276,7 @@ with gr.Blocks(title="Polymer Design with GraphDiT") as iface:
|
|
275 |
with gr.Row():
|
276 |
guidance_scale = gr.Slider(1, 3, value=2, label="Guidance Scale from Properties")
|
277 |
num_nodes = gr.Slider(0, 50, step=1, value=0, label="Number of Nodes (0 for Random, Larger Graphs Take More Time)")
|
278 |
-
repeating_time = gr.Slider(1, 10, step=1, value=
|
279 |
num_chain_steps = gr.Slider(0, 499, step=1, value=50, label="Number of Diffusion Steps to Visualize (Larger Numbers Take More Time)")
|
280 |
fps = gr.Slider(0.25, 10, step=0.25, value=5, label="Frames Per Second")
|
281 |
|
|
|
100 |
num_nodes = None if num_nodes == 0 else num_nodes
|
101 |
|
102 |
for _ in range(repeating_time):
|
103 |
+
print('repeat times:', _)
|
104 |
try:
|
105 |
model.to(device)
|
106 |
generated_molecule, img_list = model.generate(properties, guide_scale=guidance_scale, num_nodes=num_nodes, number_chain_steps=num_chain_steps)
|
|
|
276 |
with gr.Row():
|
277 |
guidance_scale = gr.Slider(1, 3, value=2, label="Guidance Scale from Properties")
|
278 |
num_nodes = gr.Slider(0, 50, step=1, value=0, label="Number of Nodes (0 for Random, Larger Graphs Take More Time)")
|
279 |
+
repeating_time = gr.Slider(1, 10, step=1, value=5, label="Repetition Until Success")
|
280 |
num_chain_steps = gr.Slider(0, 499, step=1, value=50, label="Number of Diffusion Steps to Visualize (Larger Numbers Take More Time)")
|
281 |
fps = gr.Slider(0.25, 10, step=0.25, value=5, label="Frames Per Second")
|
282 |
|