Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -37,4 +37,20 @@ theme_2 = st.text_input("Theme 2:", "Theme 2")
|
|
37 |
theme_3 = st.text_input("Theme 3:", "Theme 3")
|
38 |
theme_4 = st.text_input("Theme 4:", "Theme 4")
|
39 |
theme_5 = st.text_input("Theme 5:", "Theme 5")
|
40 |
-
refresh_interval = st.slider("Refresh interval (in seconds):",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
theme_3 = st.text_input("Theme 3:", "Theme 3")
|
38 |
theme_4 = st.text_input("Theme 4:", "Theme 4")
|
39 |
theme_5 = st.text_input("Theme 5:", "Theme 5")
|
40 |
+
refresh_interval = st.slider("Refresh interval (in seconds):",1, 10, 5)
|
41 |
+
|
42 |
+
selected_themes = [themes.get(theme, []) for theme in [theme_1, theme_2, theme_3, theme_4, theme_5]]
|
43 |
+
|
44 |
+
i = 0
|
45 |
+
while True:
|
46 |
+
# Get the selected theme and shuffle the nodes
|
47 |
+
selected_theme = selected_themes[i]
|
48 |
+
random.shuffle(selected_theme)
|
49 |
+
|
50 |
+
spinning_model(f"Theme {i+1}", selected_theme, emojis)
|
51 |
+
selected_theme = random_timer(refresh_interval)
|
52 |
+
|
53 |
+
# Increment the index and loop back to the first theme if all themes have been shown
|
54 |
+
i = (i + 1) % 5
|
55 |
+
if i == 0:
|
56 |
+
st.write("---")
|