Spaces:
Runtime error
Runtime error
Commit
·
33a3dac
1
Parent(s):
9b44ae3
Request to upload 5.31.22
Browse files
app.py
CHANGED
@@ -11,9 +11,12 @@ N = st.slider("Number of particles", 1, L**2/2, 10) #number of particles -> can
|
|
11 |
|
12 |
#initialize the system: create a list of 'particle' objects, each with random position and velocity vectors:
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
#set up the plot:
|
17 |
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
#initialize the system: create a list of 'particle' objects, each with random position and velocity vectors:
|
13 |
|
14 |
+
import streamlit as st
|
15 |
+
import numpy as np
|
|
|
16 |
|
17 |
+
L = 10 #lattice size
|
18 |
+
N = st.slider("Number of particles", 1, L**2/2, 10) #number of particles
|
19 |
+
st.write("Particle configuration:")
|
20 |
+
particles = np.random.randint(0, L, (N, 2)) #particle positions
|
21 |
+
st.write(particles)
|
22 |
+
st.title("Haltmannn Diffusion [C] 20XX")
|