awacke1 commited on
Commit
87536cd
·
1 Parent(s): 1f29db4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -4
app.py CHANGED
@@ -28,9 +28,25 @@ def random_timer():
28
  st.experimental_rerun()
29
 
30
  st.title("Spinning Model Visualization")
31
- st.write("Select a theme to display the spinning model.")
32
 
33
- selected_theme = st.selectbox("Theme:", list(themes.keys()))
 
 
34
 
35
- spinning_model(selected_theme, themes[selected_theme], emojis)
36
- random_timer()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  st.experimental_rerun()
29
 
30
  st.title("Spinning Model Visualization")
31
+ st.write("Select themes to display the spinning model.")
32
 
33
+ # Add input widgets for the two themes
34
+ theme_1 = st.text_input("Theme 1:", "Theme 1")
35
+ theme_2 = st.text_input("Theme 2:", "Theme 2")
36
 
37
+ # Get the selected themes and their nodes
38
+ selected_theme_1 = themes.get(theme_1, [])
39
+ selected_theme_2 = themes.get(theme_2, [])
40
+
41
+ while True:
42
+ # Randomly select a theme to display
43
+ if random.randint(0, 1):
44
+ selected_theme = selected_theme_1
45
+ theme = theme_1
46
+ else:
47
+ selected_theme = selected_theme_2
48
+ theme = theme_2
49
+
50
+ spinning_model(theme, selected_theme, emojis)
51
+ random_timer()
52
+ st.write("---")