joshuadunlop commited on
Commit
4b9317a
·
1 Parent(s): 523de2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -135,6 +135,8 @@ openAI_key = st.sidebar.text_input('Enter your OpenAI API key here')
135
  url = st.text_input('Enter PDF URL here')
136
  question = st.text_input('Enter your question here')
137
 
 
 
138
  if st.button('Submit'):
139
  if openAI_key.strip()=='':
140
  st.error('Please enter you Open AI Key. Get your key here : https://platform.openai.com/account/api-keys')
@@ -148,5 +150,6 @@ if st.button('Submit'):
148
  load_recommender('corpus.pdf')
149
 
150
  answer = generate_answer(question,openAI_key)
151
- st.text_area('The answer to your question is :', value=answer, height=200)
 
152
 
 
135
  url = st.text_input('Enter PDF URL here')
136
  question = st.text_input('Enter your question here')
137
 
138
+ answer = ''
139
+
140
  if st.button('Submit'):
141
  if openAI_key.strip()=='':
142
  st.error('Please enter you Open AI Key. Get your key here : https://platform.openai.com/account/api-keys')
 
150
  load_recommender('corpus.pdf')
151
 
152
  answer = generate_answer(question,openAI_key)
153
+
154
+ st.text_area('The answer to your question is :', value=answer, height=200)
155