sankar12345
commited on
Commit
•
8b88e5f
1
Parent(s):
b383582
Update app.py
Browse files
app.py
CHANGED
@@ -34,11 +34,11 @@ response = load_answer(user_input)
|
|
34 |
|
35 |
submit = st.button('Generate')
|
36 |
|
37 |
-
#If generate button is clicked
|
38 |
-
if submit:
|
39 |
-
|
40 |
st.subheader("Answer:")
|
41 |
-
|
42 |
st.write(response)
|
43 |
-
|
44 |
-
|
|
|
|
34 |
|
35 |
submit = st.button('Generate')
|
36 |
|
37 |
+
# If generate button is clicked and user_input is not empty
|
38 |
+
if submit and user_input:
|
39 |
+
response = load_answer(user_input)
|
40 |
st.subheader("Answer:")
|
|
|
41 |
st.write(response)
|
42 |
+
elif submit:
|
43 |
+
st.subheader("Answer:")
|
44 |
+
st.write("Please enter a question.")
|