Spaces:
Sleeping
Sleeping
Commit
·
72d334e
1
Parent(s):
590eb55
Update app.py
Browse files
app.py
CHANGED
@@ -136,13 +136,13 @@ col1, col2, col3, col4 = st.columns(4)
|
|
136 |
with col1:
|
137 |
url = st.text_input('Enter PDF URL here')
|
138 |
with col2:
|
139 |
-
question = st.text_input('
|
140 |
with col3:
|
141 |
-
|
142 |
with col4:
|
143 |
if st.button('Submit'):
|
144 |
if openAI_key.strip()=='':
|
145 |
-
st.error('Please enter you Open AI Key
|
146 |
elif url.strip() == '':
|
147 |
st.error('URL field is empty')
|
148 |
elif question.strip() == '':
|
@@ -153,5 +153,4 @@ with col4:
|
|
153 |
load_recommender('corpus.pdf')
|
154 |
|
155 |
answer = generate_answer(question,openAI_key)
|
156 |
-
|
157 |
-
col3.text_area('The answer to your question is :', value=answer, height=200)
|
|
|
136 |
with col1:
|
137 |
url = st.text_input('Enter PDF URL here')
|
138 |
with col2:
|
139 |
+
question = st.text_input('Question')
|
140 |
with col3:
|
141 |
+
answer_placeholder = st.empty()
|
142 |
with col4:
|
143 |
if st.button('Submit'):
|
144 |
if openAI_key.strip()=='':
|
145 |
+
st.error('Please enter you Open AI Key')
|
146 |
elif url.strip() == '':
|
147 |
st.error('URL field is empty')
|
148 |
elif question.strip() == '':
|
|
|
153 |
load_recommender('corpus.pdf')
|
154 |
|
155 |
answer = generate_answer(question,openAI_key)
|
156 |
+
answer_placeholder.text_area('The answer to your question is :', value=answer, height=200)
|
|