File size: 951 Bytes
aaaf5e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import streamlit as st
from wiki_game_st import *

# Set the title of the app
st.title("Wiki Game")

# Add body text
st.text("Enter a topic to start at and a topic to end at, and choose your level of drama")

# Set up two text inputs for start and end topics
start_topic = st.text_input("Start topic:")
end_topic = st.text_input("End topic:")

# Create a slider with values 1-5
slider = st.slider('Choose your level of drama', 1, 5)

# Create an if statement to print out the text underneath the bar based on the slider value
if slider == 1:
    st.write("Absolute zoominess")
    delay = 0
elif slider == 2:
    st.write("Some zoominess")
    delay = 2
elif slider == 3:
    st.write("You'll actually be able to read things")
    delay = 3
elif slider == 4:
    st.write("A natural pace")
    delay = 4
elif slider == 5:
    st.write("You'll only do this once")
    delay = 6

# Print the value of delay variable
st.write(f"Delay is set to: {delay}")