File size: 2,974 Bytes
0207e35
 
 
 
 
 
e3a4ce5
 
 
 
 
 
0207e35
 
 
 
e3a4ce5
 
 
 
 
 
 
 
0207e35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e3a4ce5
0207e35
 
 
 
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import streamlit as st
import requests

# Function to call the LLM API
def call_llm_api(prompt):
    api_url = "https://api.example.com/generate"
    headers = {
        "Content-Type": "application/json",
        "API-Key": "your_api_key_here"
    }
    response = requests.post(api_url, headers=headers, json={"prompt": prompt})
    return response.json().get("result", "")

# Function to perform a Google search
def google_search(query):
    api_url = "https://api.example.com/search"
    headers = {
        "API-Key": "your_api_key_here"
    }
    params = {
        "q": query,
        "num_results": 5
    }
    response = requests.get(api_url, headers=headers, params=params)
    return response.json().get("results", [])

# Streamlit app layout
st.title("Business Plan Generator")

# User inputs
business_name = st.text_input("Business Name")
business_concept = st.text_area("Business Concept")
goals = st.text_area("Goals")
legal_structure = st.text_input("Legal Structure")
mission_statement = st.text_area("Mission Statement")
unique_aspects = st.text_area("Unique Aspects")
industry = st.text_input("Industry")
market_size = st.text_input("Market Size")
target_customers = st.text_area("Target Customers")
competitors = st.text_area("Competitors")
strengths = st.text_area("Strengths")
weaknesses = st.text_area("Weaknesses")
team_members = st.text_area("Team Members (comma-separated)")
products = st.text_area("Products (comma-separated)")
strategy = st.text_area("Marketing Strategy")
location = st.text_input("Location")
facilities = st.text_area("Facilities")
processes = st.text_area("Processes")
startup_costs = st.text_input("Startup Costs")
revenue_forecast = st.text_input("Revenue Forecast")

if st.button("Generate Business Plan"):
    # Constructing the prompt for LLM
    prompt = f"""
    Generate a business plan for the following details:
    Business Name: {business_name}
    Business Concept: {business_concept}
    Goals: {goals}
    Legal Structure: {legal_structure}
    Mission Statement: {mission_statement}
    Unique Aspects: {unique_aspects}
    Industry: {industry}
    Market Size: {market_size}
    Target Customers: {target_customers}
    Competitors: {competitors}
    Strengths: {strengths}
    Weaknesses: {weaknesses}
    Team Members: {team_members}
    Products: {products}
    Marketing Strategy: {strategy}
    Location: {location}
    Facilities: {facilities}
    Processes: {processes}
    Startup Costs: {startup_costs}
    Revenue Forecast: {revenue_forecast}
    """

    # Call the LLM API to generate the business plan
    business_plan = call_llm_api(prompt)

    # Display the generated business plan
    st.subheader("Generated Business Plan")
    st.write(business_plan)

    # Perform a Google search for additional insights
    search_results = google_search(business_name)
    st.subheader("Google Search Results")
    for result in search_results:
        st.write(f"- {result['title']}: {result['link']}")