-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
36 lines (26 loc) · 1.53 KB
/
main.py
File metadata and controls
36 lines (26 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from Application.proposal_doc import Required_Document_Generator
import streamlit as st
if __name__ == "__main__":
st.title('Proposify')
user_choice = st.radio('Select Document Type', ['Customized', 'Default'])
if user_choice == 'Customized':
section_options = ['Introduction', 'Purpose', 'Scope', 'Objectives', 'Stakeholders', 'Business Background',
'Overview Of Company', 'Functional Requirements', 'Non-Functional Requirements', 'Assumptions',
'Constraints', 'Risks', 'Dependencies', 'Project Timeline', 'Risk Management', 'References',
'Conclusion', 'Glossary of terms', 'Appendix', 'Sign-Off']
selected_sections = st.multiselect('Select Sections to Include', section_options)
document_sections = selected_sections if selected_sections else []
elif user_choice == 'Default':
document_sections = 'default'
requirements_text = st.text_input(placeholder='Enter your requirements here', key='requirements', label='Prompt')
if requirements_text:
document_generator = Required_Document_Generator(requirements_text, document_sections)
generated_document = document_generator.generate_mainfile()
st.write(generated_document)
document_bytes = generated_document.encode('utf-8')
st.download_button(
label="Download Document",
data=document_bytes,
file_name="generated_document.txt",
mime="text/plain"
)