Spaces:
Build error
Build error
| import streamlit as st | |
| # Function to generate the business proposal with style formatting | |
| def generate_business_proposal(company_name, recipient_name, product_service, benefits, pricing, timeline, contact_info, style): | |
| if style == "Formal": | |
| proposal = f""" | |
| Subject: Formal Proposal for {product_service} Collaboration | |
| Dear {recipient_name}, | |
| I hope this message finds you in the best of health and spirits. I am writing to formally propose a business collaboration that I believe will be mutually beneficial to both {company_name} and your esteemed organization. | |
| **Introduction:** | |
| {company_name} is a leading provider of {product_service}. We are excited to offer you the opportunity to collaborate with us to meet your organization's needs with our high-quality solutions. | |
| **Proposed Solution/Offer:** | |
| Our {product_service} provides the following key benefits: | |
| - {benefits} | |
| **Pricing/Cost:** | |
| We offer our solution at a cost of {pricing}. This price reflects the value and quality of our offering. | |
| **Timeline:** | |
| The implementation of this solution can be completed within {timeline}, starting immediately upon confirmation. | |
| **Why {recipient_name} Should Consider This Proposal:** | |
| We believe that our solution will provide significant value to your organization, and {company_name} has a proven track record of successful collaborations in the industry. | |
| **Next Steps:** | |
| If you are interested in discussing this proposal further, please do not hesitate to contact me at your earliest convenience. | |
| I look forward to your response. | |
| Sincerely, | |
| [Your Name] | |
| [Your Job Title] | |
| {company_name} | |
| {contact_info} | |
| """ | |
| elif style == "Casual": | |
| proposal = f""" | |
| Subject: Proposal for {product_service} Collaboration | |
| Hey {recipient_name}! | |
| I hope you're doing well! I'm reaching out to share an exciting business opportunity that I believe could be a great fit for both {company_name} and your organization. | |
| **Here’s what we offer:** | |
| Our {product_service} offers these awesome benefits: | |
| - {benefits} | |
| **Pricing:** | |
| We can provide this at a price of {pricing}, which is a solid deal for the value it brings. | |
| **Timeline:** | |
| We can get things started and wrap it up within {timeline}, depending on your needs. | |
| **Why this is a great fit:** | |
| {company_name} has a great history of helping companies like yours, and we know our {product_service} can help take things to the next level. | |
| **What’s next:** | |
| If you're interested, just let me know and we can chat more! | |
| Looking forward to hearing from you. | |
| Cheers, | |
| [Your Name] | |
| [Your Job Title] | |
| {company_name} | |
| {contact_info} | |
| """ | |
| elif style == "Business": | |
| proposal = f""" | |
| Subject: Proposal for {product_service} Collaboration | |
| Dear {recipient_name}, | |
| I hope this message finds you well. I am writing to formally propose a collaboration between {company_name} and your organization, specifically in the area of {product_service}. | |
| **Overview:** | |
| {company_name} specializes in providing top-tier {product_service}, and we are eager to offer you a comprehensive solution that fits your needs. | |
| **Key Benefits of Our Proposal:** | |
| - {benefits} | |
| **Pricing Details:** | |
| The total cost for this solution is {pricing}, which we believe is highly competitive considering the value provided. | |
| **Implementation Timeline:** | |
| We anticipate completing the implementation within {timeline}, contingent upon your approval. | |
| **Why Partner with {company_name}:** | |
| With years of experience and successful case studies in your industry, {company_name} is uniquely positioned to help your organization achieve its goals. | |
| **Next Steps:** | |
| Should you find this proposal of interest, I would be happy to schedule a call or meeting to discuss further. | |
| I look forward to your positive response. | |
| Best regards, | |
| [Your Name] | |
| [Your Job Title] | |
| {company_name} | |
| {contact_info} | |
| """ | |
| else: | |
| proposal = "Invalid style selected." | |
| return proposal | |
| # Streamlit App | |
| def main(): | |
| st.title("Business Proposal Generator") | |
| # Input fields for the user to enter details for the proposal | |
| st.subheader("Enter the details of your business proposal") | |
| company_name = st.text_input("Your Company Name:") | |
| recipient_name = st.text_input("Recipient's Name:") | |
| product_service = st.text_input("Product/Service Offered:") | |
| benefits = st.text_area("Key Benefits (one per line):") | |
| pricing = st.text_input("Pricing/Cost:") | |
| timeline = st.text_input("Timeline for Implementation:") | |
| contact_info = st.text_input("Your Contact Information:") | |
| # Add option to select style | |
| style = st.selectbox("Choose the proposal style:", ["Formal", "Casual", "Business"]) | |
| if st.button("Generate Proposal"): | |
| if company_name and recipient_name and product_service and benefits and pricing and timeline and contact_info: | |
| proposal = generate_business_proposal( | |
| company_name, recipient_name, product_service, benefits, pricing, timeline, contact_info, style | |
| ) | |
| st.subheader("Generated Proposal:") | |
| st.text_area("Your Business Proposal", proposal, height=300) | |
| # Provide option to download the generated proposal as a .txt file | |
| st.download_button( | |
| label="Download Proposal", | |
| data=proposal, | |
| file_name="business_proposal.txt", | |
| mime="text/plain" | |
| ) | |
| else: | |
| st.warning("Please fill in all the fields.") | |
| if __name__ == "__main__": | |
| main() | |