DebasishDhal99
commited on
Commit
·
ce52305
1
Parent(s):
c94640f
Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,21 @@ agent_count = gr.Number(value=3, label = "Number of agents")
|
|
18 |
random_seed_single = gr.Number(value=42,label="Random seed. Delete it to go full random mode, keep it for reproducibility")
|
19 |
random_seed_multi = gr.Number(value=42,label="Random seed. Delete it to go full random mode, keep it for reproducibility")
|
20 |
|
21 |
-
iface1 = gr.Interface(
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
combinedinterface = gr.TabbedInterface([iface1,iface2],['Single Particle Random Walk', 'Multi-Particle Random Walk'])
|
25 |
combinedinterface.launch()
|
|
|
18 |
random_seed_single = gr.Number(value=42,label="Random seed. Delete it to go full random mode, keep it for reproducibility")
|
19 |
random_seed_multi = gr.Number(value=42,label="Random seed. Delete it to go full random mode, keep it for reproducibility")
|
20 |
|
21 |
+
iface1 = gr.Interface(
|
22 |
+
fn=generate_random_walk,
|
23 |
+
inputs=[iters_single, step_size_single, random_seed_single],
|
24 |
+
outputs=["image","file"],
|
25 |
+
title="2-D Random Walk",
|
26 |
+
description="Uniform steps along NEWS directions only",
|
27 |
+
theme="compact"
|
28 |
+
)
|
29 |
+
iface2 = gr.Interface(
|
30 |
+
fn=multi_agent_walk,
|
31 |
+
inputs=[iters_multi,iters_multi, step_size_multi, random_seed_multi],
|
32 |
+
outputs=["image","file"],
|
33 |
+
title="Multi-Agent 2D Random Walk",
|
34 |
+
theme="compact"
|
35 |
+
)
|
36 |
|
37 |
combinedinterface = gr.TabbedInterface([iface1,iface2],['Single Particle Random Walk', 'Multi-Particle Random Walk'])
|
38 |
combinedinterface.launch()
|