Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,22 +1,23 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
def
|
| 4 |
-
|
| 5 |
-
answer=llm(question)
|
| 6 |
-
return answer
|
| 7 |
-
|
| 8 |
-
def get_text(): #from the UI App
|
| 9 |
-
input_text = st.text_input("Enter a question: ", key="input")
|
| 10 |
return input_text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
#UIApp starts here
|
| 13 |
-
st.set_page_config(page_title="
|
| 14 |
-
st.header("
|
| 15 |
|
| 16 |
-
user_input=
|
| 17 |
-
response=
|
| 18 |
|
| 19 |
-
submit=st.button('
|
| 20 |
if submit:
|
| 21 |
-
st.subheader("
|
| 22 |
st.write(response)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
def get_userInput(): #from the UI App
|
| 4 |
+
input_text = st.text_input("Enter a number: ", key="input")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
return input_text
|
| 6 |
+
|
| 7 |
+
def validate_userInput(user_input):
|
| 8 |
+
if user_input.isdigit():
|
| 9 |
+
return True
|
| 10 |
+
else:
|
| 11 |
+
return False
|
| 12 |
|
| 13 |
#UIApp starts here
|
| 14 |
+
st.set_page_config(page_title="Python - Tic Tac Toe", page_icon=":python:")
|
| 15 |
+
st.header("Python - Tic Tac Toe")
|
| 16 |
|
| 17 |
+
user_input=get_userInput()
|
| 18 |
+
response=validate_userInput(user_input)
|
| 19 |
|
| 20 |
+
submit=st.button('Submit')
|
| 21 |
if submit:
|
| 22 |
+
st.subheader("")
|
| 23 |
st.write(response)
|