bizvideoschool's picture
Update app.py
25c0c0b
raw
history blame
12 kB
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")
# Function to recommend classes based on video-making experience
def recommend_classes(video_experience):
# Full class list from the Small Business Video Roadmap
class_list = [
"Getting Started with Video Using The 6-Step BVS Process",
"Class #1: Why Video Works and Outlining Your 12-Month Plan",
"Class #2: 6 Simple Steps to Creating a Video (Part 1)",
"Class #3: 6 Simple Steps to Creating a Video (Part 2)",
"Your First Video Strategy: Building Relationships with Video Messages",
"Class #1: 5 Easy Video Message Strategies",
"Class #2: How to Create and Send 1-to-1 Videos",
"Tutorial: Using Vidyard to Send 1-to-1 Videos",
"Tutorial: Using BombBomb to Send 1-to-1 Videos",
"Tutorial: Using Dubb to Send 1-to-1 Videos",
"Tutorial: Using Facebook Messenger to Send 1-to-1 Videos",
"Tutorial: Using Instagram Messenger to Send 1-to-1 Videos",
"Class #3: Establishing YOUR Video Messaging System… and Habit!",
"Bonus Training: Which Video Messaging Tool Should You Use?",
"Scale Yourself with Video",
"Class #1: Create FAQ Videos to Save Time (Part 1)",
"Class #2: Create FAQ Videos to Save Time (Part 2)",
"Class #3: Enhancing Your Videos with Canva Templates",
"Class #4: Create Training Videos for Your Team",
"Class #5: Communicate with Your SOI Database at Scale",
"Class #6: Being Compelling on Camera",
"Class #7: The Basics of Scripting",
"Tutorial: Recording Video Footage with Jump Cuts in CapCut",
"Tutorial: How to Use the CapCut Camera and Teleprompter",
"Tutorial: Be Authentic and Compelling on Camera (Part 1)",
"Tutorial: Be Authentic and Compelling on Camera (Part 2)",
"Tutorial: How to Use the BIGVU Teleprompter App",
"Tutorial: How to Use the PromptSmart Pro Teleprompter App",
"Video Editing 101",
"Class #1: Video Editing Tools and Terminology",
"Class #2: Video Editing in Wondershare Filmora (Part 1)",
"Class #3: Video Editing in Wondershare Filmora (Part 2)",
"Class #4: Video Editing in Wondershare Filmora (Part 3)",
"Class #5: Kapwing’s Best AI Tools",
"Class #6: Video Editing in Kapwing (Part 1)",
"Class #7: Video Editing in Kapwing (Part 2)",
"Class #8: Video Editing in Kapwing (Part 3)",
"Class #9: Video Editing in the VivaVideo Mobile App (Part 1)",
"Class #10: Video Editing in the VivaVideo Mobile App (Part 2)",
"Class #11: Video Editing in CapCut Mobile App (Part 1)",
"Class #12: Video Editing in CapCut Mobile App (Part 2)",
"Class #13: Video Editing in CapCut Mobile App (Part 3)",
"Class #14: Video Editing in CapCut on a Computer (Part 1)",
"Class #15: Video Editing in CapCut on a Computer (Part 2)",
"Class #16: Video Editing in CapCut on a Computer (Part 3)",
"Class #17: Simple Video Editing with Canva Templates",
"Class #18: An Intro to Davinci Resolve",
"Improve Your Video Professionalism",
"Class #1: Your Video Setup and Equipment Checklist",
"Class #2: Video Lighting 101",
"Class #3: Video Audio 101",
"Class #4: Craft the Ultimate Brand Video - Part 1",
"Class #5: Craft the Ultimate Brand Video - Part 2",
"Class #6: Techniques for Captivating B-Roll Footage",
"Class #7: Storytelling Through Video",
"Map Out Your Social Media Strategy",
"Class #1: Defining Your Customer Avatar and Content Pillars",
"Class #2: Video on Major Social Media Platforms",
"Tutorial: Writing Social Media Video Descriptions and Increasing Engagement",
"Tutorial: Strategies for Growing Your Social Media Following",
"Class #3: Using Video on Facebook",
"Tutorial: How to Post a Video on Facebook",
"Class #4: Facebook Reels 101",
"Class #5: Making a Facebook Live Video",
"Class #6: Using Video on Instagram",
"Class #7: Instagram Reels 101",
"Tutorial: How to Post a Video on Instagram",
"Class #8: 5 Simple Video Ideas for FB or IG Stories (with Jeff Pfitzer)",
"Class #9: 3 Easy Video Formats for Instagram Reels",
"Class #10: Using Video On YouTube",
"Class #11: YouTube Shorts 101",
"Tutorial: How to Post a Video on YouTube",
"Class #12: Using Video on TikTok",
"Class #13: What's Working on TikTok",
"Class #14: Using Video on LinkedIn",
"Class #15: Using Video on LinkedIn",
"Tutorial: How to Post a Video on LinkedIn",
"Class #16: Understanding Your Video Analytics",
"Class #17: Become the \"Local Authority\" through Social Media Videos (with Jeff Pfitzer)",
"Class #18: Current Social Media Video Trends with Tristan Ahumada",
"Class #19: Create an Edited Social Media Video in 60 Minutes!",
"Class #20: Pillar Talk: How to Build Your Social Media Empire",
"Class #21: 3 Video Tools You NEED to Use on Instagram (with Jeff Pfitzer)",
"Class #22: Make Social Media Your #1 Prospecting Tool in 2024 (with Jeff Pfitzer)",
"Create Your 12-Month Video Content Calendar",
"Class #1: Planning and Scripting Your Video",
"Class #2: Maximizing Engagement with Your Videos",
"Class #3: Planning More Complex Video Shoots",
"Class #4: Creating Your Video Content Calendar",
"Develop YOUR Video Marketing Funnel",
"Class #1: An Intro to Crafting YOUR Video Marketing Funnel",
"Class #2: Dual Attraction - Awareness Videos & Lead Generation Strategies",
"Class #3: Use Facebook Ads to Pull in Prospects (Part 1)",
"Class #4: Use Facebook Ads to Pull in Prospects (Part 2)",
"Class #5: Optimize Your Lower Funnel (Part 1) - Consideration & Conversion Videos",
"Class #6: Optimize Your Lower Funnel (Part 2) - Precision Facebook Ad Retargeting",
"Class #7: Email Enchantment - Nurture Leads with Video Email Newsletters",
"Class #8: Loyalty & Advocacy - Building Lasting Connections",
"Class #9: Convert More Leads Using Facebook Ads",
"Implementing a YouTube Video Strategy",
"Class #1: Introduction to YouTube",
"Class #2: Optimizing Your YouTube Channel",
"Class #3: Enhancing Your YouTube Videos",
"Class #4: Design an Eye-Catching YouTube Thumbnail",
"Class #5: Promoting Your YouTube Channel",
"Class #6: Creating Your First YouTube Video Ad",
"Class #7: 3 Easy YouTube Shorts Ideas",
"Class #8: 6 Long-Form YouTube Videos You Should Make",
"Bonus Training: Researching Tactics for Long Form Videos - with Tristan Ahumada",
"Creating Consistent Branding in Your Videos",
"Class #1: Branding 101",
"Class #2: Branding Choices When Filming",
"Class #3: Branding Choices When Editing",
"Using AI & Video to Generate Leads",
"Class #1: Using AI & Video to Generate Leads - Overview and Demo",
"Class #2: Using AI & Video to Generate Leads - Developing the Code and Uploading to Huggingface",
"Class #3: Using AI & Video to Generate Leads - Testing and Deploying the AI Tool",
"Class #4: Using AI & Video to Generate Leads - Marketing the AI Tool and Converting Leads",
# (Continue with Real Estate Case Studies)
"BVS Member Video Success Stories - Sheila, Francis and Daphne",
"Viral Video Case Study with Bob Tompkins",
"Listing Video Case Study with Brad McCallum",
"Video Case Study with Lana Rodriguez",
"Video Case Study with Valerie Van de Zilver",
"How to Farm a Neighborhood Using Video (with Ryan Smith)",
"YouTube Video Case Study with Ken Pozek",
"YouTube Video Case Study with Malcolm Lawson (Part 1)",
"YouTube Video Case Study with Malcolm Lawson (Part 2)",
"What to Say About the NAR Case in Your Videos",
# (Continue with Short Tutorials: Making Video a Priority for Your Business)
"Why Video? Why Now?",
"How to Create a Video Habit",
"A Time Management Strategy For Real Estate Agents: Full Tutorial",
# (Continue with Short Tutorials: Creating Better Videos with a Smartphone)
"You Don't Need an Expensive Camera... Here's Why!",
"4 Phone Camera Lighting Hacks",
"Why You May Need to Adjust Your iPhone's HDR Setting",
"Trim the Beginning and End of a Video on Your Phone",
"Creating Stable Footage with a Phone and... Cup?!",
"Record Your Screen on an iPhone",
"How to Use Green Screen with PowerDirector",
"Video Composition 101",
# Short Tutorials: Transferring, Storing and Organizing Video Files
"Transferring Files: Using WeTransfer or Google Drive",
"Transferring Files: iPhone to Mac (AirDrop)",
"Transferring Files: Using the Simple Transfer app (iPhone to any computer)",
"Storing and Organizing Your Video Files",
# Short Tutorials: Using BombBomb to Create and Send Videos
"BombBomb 1-to-1 Video Ideas for Your SOI/Database",
"Create a Killer Hook for Your BombBomb Videos",
"Adding Your SOI Database to BombBomb",
"4 Ways to Record and Send a Video with BombBomb",
]
if video_experience < 3:
# Recommend earlier classes for beginners
return class_list[:3] # Adjust indices as needed
else:
# Recommend more advanced classes for experienced users
return class_list[-3:] # Adjust indices as needed
# 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.")
st.subheader("Your Video Making Experience")
video_experience = st.number_input("How many videos have you made in the past month?", min_value=0, max_value=100, step=1)
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. You will reply with ideas for each of the 12 months of the year and 10 specific distribution strategies to maximize video views, "
f"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. You are specialized in creating a diverse range of video topic ideas for businesses. Your ideas are a creative blend of topics that focus on the interests or pain points of the client. They are often community oriented but 1 in 4 ideas is promotional in nature and focuses on helping the business attract customers. "},
{"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)
# Recommend classes based on video-making experience
class_recommendations = recommend_classes(video_experience)
st.markdown("### Recommended Classes from Small Business Video Roadmap")
st.write(", ".join(class_recommendations))
# Copy to clipboard button
if marketing_plan:
full_text = marketing_plan + "\n\nRecommended Classes: " + ", ".join(class_recommendations)
st.text_area("Copy and paste the plan", full_text, height=300, key="text_area")
st.button("Copy to Clipboard", key="copy-button")
# No additional code needed beyond this point for your application