Spaces:
Sleeping
Sleeping
Update app.py
Browse files109 unmodified lines1101111121131141151164 unmodified lines121122123124125126127128129130131132133124125126127128129130131134135133136137138109 unmodified lines st.error(st.session_state.error) if st.session_state.success != None: st.sucess("Download the CSV below / Click reset to upload more PDFs") st.download_button( label="Download Q/A pairs as CSV", data=st.session_state.success,4 unmodified lines st.session_state.success = None st.rerun() else: uploaded_files = st.file_uploader("Upload PDFs Here", type="pdf", accept_multiple_files=True) question_protocol = st.text_input("Provide instructions for how questions should be generated", "Write a question based on the text") answer_protocol = st.text_input("Provide instructions for how answers should be generated", "Write an answer based on the text") sentence_chunks = st.number_input("Number sentences per Q/A pair", value=2, step=1, min_value=1, max_value=3) openai_api_key = st.text_input("Enter your OpenAI API key", type="password")
uploaded_files = st.file_uploader("Upload PDFs Here", type="pdf", accept_multiple_files=True)
question_protocol = st.text_input("Provide instructions for how questions should be generated", "Write a question based on the text")answer_protocol = st.text_input("Provide instructions for how answers should be generated", "Write an answer based on the text")
sentence_chunks = st.number_input("Number sentences per Q/A pair", value=2, step=1, min_value=1, max_value=3)
openai_api_key = st.text_input("Enter your OpenAI API key", type="password") submit = st.button("Submit")
submit = st.button("Submit")if submit: st.session_state.submit = True
app.py+11-9