Wiki-Game / app.py
KAI MAURIN-JONES
files added
aaaf5e8
raw
history blame
No virus
951 Bytes
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}")