Spaces:
Sleeping
Sleeping
Update app.py
Browse files109 unmodified lines1101111121131141154 unmodified lines120121122123124125126127128129130131132133134135136109 unmodified linesst.error(st.session_state.error)if st.session_state.success != None:st.download_button(label="Download Q/A pairs as CSV",data=st.session_state.success,4 unmodified linesst.session_state.success = Nonest.rerun()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")if submit:st.session_state.submit = True109 unmodified lines1101111121131141151164 unmodified lines121122123124125126127128129130131132133134135136137138109 unmodified linesst.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 linesst.session_state.success = Nonest.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")submit = st.button("Submit")if submit:st.session_state.submit = True
app.py+11-9