DebasishDhal99 commited on
Commit
c94640f
·
1 Parent(s): 9b1c103

Removing block duplication error

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -7,13 +7,19 @@ import pandas as pd
7
  from single_agent_2D import generate_random_walk
8
  from multi_agent_2D import multi_agent_walk
9
 
10
- iters = gr.Number(value=1e6,label="How many random steps?")
11
- step_size = gr.Number(value=1,label="Step size")
 
 
 
 
12
  agent_count = gr.Number(value=3, label = "Number of agents")
13
- random_seed = gr.Number(value=42,label="Random seed. Delete it to go full random mode, keep it for reproducibility")
 
 
14
 
15
- iface1 = gr.Interface(fn=generate_random_walk, inputs=[iters, step_size, random_seed], outputs=["image","file"], title="2-D Random Walk", description="Uniform steps along NEWS directions only")
16
- iface2 = gr.Interface(fn=multi_agent_walk, inputs=[iters,iters, step_size, random_seed], outputs=["image","file"], title="Multi-Agent 2D Random Walk")
17
 
18
  combinedinterface = gr.TabbedInterface([iface1,iface2],['Single Particle Random Walk', 'Multi-Particle Random Walk'])
19
  combinedinterface.launch()
 
7
  from single_agent_2D import generate_random_walk
8
  from multi_agent_2D import multi_agent_walk
9
 
10
+ iters_single = gr.Number(value=1e6,label="How many random steps?")
11
+ iters_multi = gr.Number(value=1e6,label="How many random steps?")
12
+
13
+ step_size_single = gr.Number(value=1,label="Step size")
14
+ step_size_multi = gr.Number(value=1,label="Step size")
15
+
16
  agent_count = gr.Number(value=3, label = "Number of agents")
17
+
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(fn=generate_random_walk, inputs=[iters_single, step_size_single, random_seed_single], outputs=["image","file"], title="2-D Random Walk", description="Uniform steps along NEWS directions only")
22
+ iface2 = gr.Interface(fn=multi_agent_walk, inputs=[iters_multi,iters_multi, step_size_multi, random_seed_multi], outputs=["image","file"], title="Multi-Agent 2D Random Walk")
23
 
24
  combinedinterface = gr.TabbedInterface([iface1,iface2],['Single Particle Random Walk', 'Multi-Particle Random Walk'])
25
  combinedinterface.launch()