bizvideoschool commited on
Commit
27807b2
1 Parent(s): ed5f436

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -7,7 +7,7 @@ from io import BytesIO
7
  # Access the OpenAI API key from Hugging Face Spaces secrets
8
  openai.api_key = st.secrets["OPENAI_API_KEY"]
9
 
10
- st.title("2024 Video Marketing Plan Generator")
11
 
12
  # User inputs for the marketing plan
13
  st.subheader("Define Your Target Audience")
@@ -22,10 +22,11 @@ current_marketing_efforts = st.text_area("Current Marketing Strategies", placeho
22
  st.subheader("Budget Considerations")
23
  marketing_budget = st.text_input("Marketing Budget", placeholder="Estimated budget for video marketing")
24
 
25
- if st.button('Generate My Video Marketing Plan'):
26
  # Construct the prompt for text generation
27
  prompt_text = (
28
- f"Create a detailed 2024 video marketing plan for a business targeting customers with the following profile: {customer_profile}. "
 
29
  f"Key differentiators: {business_differentiators}. Current marketing efforts: {current_marketing_efforts}. "
30
  f"Budget: {marketing_budget}."
31
  )
@@ -35,16 +36,16 @@ if st.button('Generate My Video Marketing Plan'):
35
  response_text = openai.ChatCompletion.create(
36
  model="gpt-4",
37
  messages=[
38
- {"role": "system", "content": "You are a knowledgeable marketing assistant."},
39
  {"role": "user", "content": prompt_text}
40
  ]
41
  )
42
- marketing_plan = response_text.choices[0].message['content']
43
  except Exception as e:
44
- marketing_plan = f"Error in generating marketing plan: {e}"
45
 
46
- # Display the marketing plan
47
- st.markdown("### Your Customized Video Marketing Plan")
48
- st.write(marketing_plan)
49
 
50
  # Additional features like image generation can be added here if relevant
 
7
  # Access the OpenAI API key from Hugging Face Spaces secrets
8
  openai.api_key = st.secrets["OPENAI_API_KEY"]
9
 
10
+ st.title("Advanced 2024 Video Marketing Plan Generator")
11
 
12
  # User inputs for the marketing plan
13
  st.subheader("Define Your Target Audience")
 
22
  st.subheader("Budget Considerations")
23
  marketing_budget = st.text_input("Marketing Budget", placeholder="Estimated budget for video marketing")
24
 
25
+ if st.button('Generate My Detailed Video Marketing Plan'):
26
  # Construct the prompt for text generation
27
  prompt_text = (
28
+ f"Create a comprehensive and detailed 2024 video marketing plan for a business targeting customers with the following profile: {customer_profile}. "
29
+ f"Include fleshed-out video ideas, partial script suggestions, and strategic advice. "
30
  f"Key differentiators: {business_differentiators}. Current marketing efforts: {current_marketing_efforts}. "
31
  f"Budget: {marketing_budget}."
32
  )
 
36
  response_text = openai.ChatCompletion.create(
37
  model="gpt-4",
38
  messages=[
39
+ {"role": "system", "content": "You are an expert marketing strategist."},
40
  {"role": "user", "content": prompt_text}
41
  ]
42
  )
43
+ detailed_marketing_plan = response_text.choices[0].message['content']
44
  except Exception as e:
45
+ detailed_marketing_plan = f"Error in generating detailed marketing plan: {e}"
46
 
47
+ # Display the detailed marketing plan
48
+ st.markdown("### Your Comprehensive Video Marketing Plan")
49
+ st.write(detailed_marketing_plan)
50
 
51
  # Additional features like image generation can be added here if relevant