PythonTicTacToe / app.py
aashwinik's picture
Update app.py
5f4fc3b verified
raw
history blame
539 Bytes
import streamlit as st
def get_userInput(): #from the UI App
input = st.text_input("Enter a number: ", key="input")
return input
def validate_userInput(user_input):
if user_input.isdigit():
return True
else:
return False
#UIApp starts here
st.set_page_config(page_title="Python - Tic Tac Toe", page_icon=":python:")
st.header("Python - Tic Tac Toe")
user_input=get_userInput()
response=validate_userInput(user_input)
submit=st.button('Submit')
if submit:
st.subheader("")
st.write(response)