File size: 2,183 Bytes
85df0a9
0a480c8
c1fbddd
757b271
 
bf70abc
fc97a11
f23c1ac
d0e7c6f
09b2212
 
 
 
 
 
 
fc97a11
757b271
09b2212
 
79d973a
09b2212
 
 
 
 
 
 
79d973a
09b2212
 
 
 
 
 
a2b71e3
71eee80
09b2212
 
d0e7c6f
79d973a
 
 
 
 
 
 
4668199
 
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
import streamlit as st
import openai

# Access the OpenAI API key from Hugging Face Spaces secrets
openai.api_key = st.secrets["OPENAI_API_KEY"]

st.title("2024 Video Content Calendar Generator")

# User inputs for the marketing plan
st.subheader("Define Your Business and Audience")
business_type = st.text_input("Your Business Type", placeholder="e.g., Cafe, Yoga Studio")
target_audience = st.text_area("Describe Your Target Audience", placeholder="e.g., demographics, interests")

st.subheader("Current Marketing Efforts")
current_marketing = st.text_area("Current Marketing Strategies", placeholder="Describe your ongoing marketing activities.")

if st.button('Generate My Custom 2024 Video Content Plan'):
    # Construct the prompt for text generation
    prompt_text = (
        f"Generate a 2024 video marketing plan for a {business_type} targeting an audience characterized as: {target_audience}. "
        f"Include up to four video ideas for each month of 2024, based on current marketing efforts: {current_marketing}."
    )

    # Call the OpenAI API for text generation
    try:
        response_text = openai.ChatCompletion.create(
            model="gpt-4",
            messages=[
                {"role": "system", "content": "You are an AI specializing in marketing strategy."},
                {"role": "user", "content": prompt_text}
            ]
        )
        marketing_plan = response_text.choices[0].message['content']
    except Exception as e:
        marketing_plan = f"Error in generating marketing plan: {e}"

    # Display the marketing plan
    st.markdown("### Your Customized Video Marketing Plan")
    st.write(marketing_plan)

    # Suggestion to enroll in Business Video School
    st.markdown("### Take Your Video Marketing to the Next Level!")
    st.write(
        "To successfully execute your new video marketing plan, consider enrolling in Business Video School. "
        "Our One Day Challenge and Video Workspaces are designed to keep you accountable and help you stay on track with your plan. "
        "Join now to transform your video marketing strategy!"
    )

# No additional code needed beyond this point for your application