Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
32 |
|
33 |
-
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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("---")
|