nniehaus commited on
Commit
f2703c6
·
1 Parent(s): 60c4645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -10
app.py CHANGED
@@ -5,29 +5,53 @@ import os
5
  # Access the OpenAI API key from Hugging Face Spaces secrets
6
  openai.api_key = st.secrets["OPENAI_API_KEY"]
7
 
8
- st.title("2024 Lead Generation Plan Creator for Small Businesses")
9
 
10
  # User inputs for creating the lead generation plan
11
- st.subheader("Tell Us About Your Business")
12
- business_description = st.text_area("Business Description", placeholder="Describe your business (e.g., nature, services/products, size).")
13
- target_customers = st.text_area("Target Customers", placeholder="Describe your ideal customers (e.g., demographics, interests, locations).")
14
- advertising_budget = st.selectbox("Advertising Budget", ["No budget", "Limited budget", "Moderate budget", "Large budget"])
15
- additional_details = st.text_area("Additional Details", placeholder="Any specific goals or strategies you've considered?")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  # Function to generate the lead generation plan
18
  def generate_lead_generation_plan(business_description, target_customers, advertising_budget, additional_details):
19
- prompt = f"Create a specific and actionable lead generation plan for 2024 for a business described as follows: {business_description}. The target customers are: {target_customers}. The advertising budget is: {advertising_budget}. Additional details: {additional_details}. Include detailed steps, specific platforms for advertising, tools for lead capture and management, and clear action items."
 
 
 
 
 
20
  response = openai.ChatCompletion.create(
21
  model="gpt-4",
22
  messages=[
23
- {"role": "system", "content": "You are a marketing expert providing actionable plans."},
24
  {"role": "user", "content": prompt}
25
  ],
26
- max_tokens=700 # Adjust the token limit as needed for more detailed responses
27
  )
28
  return response.choices[0].message['content']
29
 
 
30
  if st.button('Generate Lead Generation Plan'):
31
- plan = generate_lead_generation_plan(business_description, target_customers, advertising_budget, additional_details)
 
 
32
  st.subheader("Your Customized Lead Generation Plan for 2024:")
33
  st.write(plan)
 
5
  # Access the OpenAI API key from Hugging Face Spaces secrets
6
  openai.api_key = st.secrets["OPENAI_API_KEY"]
7
 
8
+ st.title("Comprehensive Lead Generation Plan for 2024")
9
 
10
  # User inputs for creating the lead generation plan
11
+ st.subheader("Describe Your Business")
12
+ business_description = st.text_area(
13
+ "Business Description",
14
+ placeholder="Briefly describe your business, including products/services offered."
15
+ )
16
+
17
+ st.subheader("Target Audience")
18
+ target_customers = st.text_area(
19
+ "Target Customers",
20
+ placeholder="Describe your ideal customers (e.g., demographics, interests)."
21
+ )
22
+
23
+ st.subheader("Budget and Preferences")
24
+ advertising_budget = st.selectbox(
25
+ "Advertising Budget",
26
+ ["No budget", "Limited budget", "Moderate budget", "Large budget"]
27
+ )
28
+ additional_details = st.text_area(
29
+ "Additional Details",
30
+ placeholder="Any specific goals, strategies, or preferences?"
31
+ )
32
 
33
  # Function to generate the lead generation plan
34
  def generate_lead_generation_plan(business_description, target_customers, advertising_budget, additional_details):
35
+ prompt = (
36
+ f"Create a detailed lead generation plan for 2024 for a business with the following details: "
37
+ f"Description: {business_description}; Target customers: {target_customers}; "
38
+ f"Advertising budget: {advertising_budget}. Additional details: {additional_details}. "
39
+ "Include specific ad placements, creative opt-in strategies, video marketing ideas, and AI lead generation tools."
40
+ )
41
  response = openai.ChatCompletion.create(
42
  model="gpt-4",
43
  messages=[
44
+ {"role": "system", "content": "You are a marketing expert providing detailed lead generation plans."},
45
  {"role": "user", "content": prompt}
46
  ],
47
+ max_tokens=700
48
  )
49
  return response.choices[0].message['content']
50
 
51
+ # Generate and display the plan
52
  if st.button('Generate Lead Generation Plan'):
53
+ plan = generate_lead_generation_plan(
54
+ business_description, target_customers, advertising_budget, additional_details
55
+ )
56
  st.subheader("Your Customized Lead Generation Plan for 2024:")
57
  st.write(plan)