nniehaus commited on
Commit
0f5606e
·
verified ·
1 Parent(s): ae1693c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +90 -35
app.py CHANGED
@@ -2,7 +2,6 @@ import streamlit as st
2
  import requests
3
  import os
4
  from bs4 import BeautifulSoup
5
- from urllib.parse import urljoin
6
 
7
  # Configure DeepSeek
8
  DEEPSEEK_API_KEY = os.getenv("DEEPSEEK_API_KEY")
@@ -31,26 +30,64 @@ def scrape_website(url, max_pages=3):
31
  elements = soup.find_all(tag)
32
  content.extend([elem.get_text(strip=True) for elem in elements if elem.get_text(strip=True)])
33
 
34
- return " ".join(content[:1500]) # Limit content length
35
  except Exception as e:
36
  st.error(f"Error scraping website: {str(e)}")
37
  return None
38
 
39
  def generate_marketing_plan(business_info):
40
- """Generate video marketing plan using DeepSeek"""
41
- prompt = f"""Create a detailed video marketing funnel plan based on this business information:
42
 
43
  {business_info}
44
 
45
- Create a 12-month video marketing plan including:
46
- 1. Key video content themes for different stages of the customer journey
47
- 2. Script outlines for 3 high-impact awareness videos
48
- 3. Content distribution strategy
49
- 4. Lead magnet suggestions for each video type
50
- 5. Recommended tools and platforms
51
- 6. KPIs to track
52
 
53
- Format with markdown headers and bullet points."""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  headers = {
56
  "Authorization": f"Bearer {DEEPSEEK_API_KEY}",
@@ -60,11 +97,46 @@ Format with markdown headers and bullet points."""
60
  data = {
61
  "model": "deepseek-chat",
62
  "messages": [
63
- {"role": "system", "content": "You are a video marketing expert specializing in creating conversion funnels for businesses."},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  {"role": "user", "content": prompt}
65
  ],
66
  "temperature": 0.7,
67
- "max_tokens": 2000
68
  }
69
 
70
  try:
@@ -76,9 +148,9 @@ Format with markdown headers and bullet points."""
76
  return None
77
 
78
  # Streamlit UI
79
- st.set_page_config(page_title="Video Marketing Plan Generator", layout="wide")
80
- st.title("🎥 AI Video Marketing Plan Generator")
81
- st.markdown("### Get a customized video marketing strategy for your business")
82
 
83
  # Input method selection
84
  input_method = st.radio(
@@ -115,7 +187,6 @@ if input_method == "Enter business details manually":
115
 
116
  plan = generate_marketing_plan(business_info)
117
  if plan:
118
- st.success("✅ Your AI-Generated Video Marketing Plan")
119
  st.markdown(plan)
120
 
121
  else:
@@ -133,20 +204,4 @@ else:
133
  if website_content:
134
  plan = generate_marketing_plan(website_content)
135
  if plan:
136
- st.success("✅ Your AI-Generated Video Marketing Plan")
137
- st.markdown(plan)
138
-
139
- st.markdown("---")
140
- st.markdown("""
141
- *Want to implement this strategy with expert guidance? [Schedule a free consultation →](your-calendly-link)*
142
- """)
143
-
144
- # Add contact form
145
- with st.expander("💡 Get more marketing insights"):
146
- st.markdown("Leave your contact information to receive weekly video marketing tips and updates")
147
- contact_email = st.text_input("Email Address")
148
- if st.button("Subscribe"):
149
- if contact_email:
150
- st.success("Thanks for subscribing! Check your inbox for a welcome message.")
151
- else:
152
- st.error("Please enter your email address")
 
2
  import requests
3
  import os
4
  from bs4 import BeautifulSoup
 
5
 
6
  # Configure DeepSeek
7
  DEEPSEEK_API_KEY = os.getenv("DEEPSEEK_API_KEY")
 
30
  elements = soup.find_all(tag)
31
  content.extend([elem.get_text(strip=True) for elem in elements if elem.get_text(strip=True)])
32
 
33
+ return " ".join(content[:1500])
34
  except Exception as e:
35
  st.error(f"Error scraping website: {str(e)}")
36
  return None
37
 
38
  def generate_marketing_plan(business_info):
39
+ """Generate comprehensive video marketing plan using DeepSeek"""
40
+ prompt = f"""As a video marketing strategist specializing in conversion optimization, create a comprehensive video funnel strategy based on this business information:
41
 
42
  {business_info}
43
 
44
+ Develop a sophisticated 12-month video marketing strategy that includes:
 
 
 
 
 
 
45
 
46
+ 1. CORE STRATEGY (Think Differently)
47
+ - Identify 3 unique angles or approaches that would differentiate this business's video content
48
+ - Suggest innovative ways to showcase the business's unique value proposition
49
+ - Recommend specific storytelling techniques that would resonate with their target audience
50
+
51
+ 2. FUNNEL ARCHITECTURE
52
+ For each stage below, provide specific video content ideas that move prospects forward:
53
+ - Top of Funnel: Pattern interruption content that stops the scroll
54
+ - Middle of Funnel: Trust-building content that demonstrates expertise
55
+ - Bottom of Funnel: Conversion content that overcomes objections
56
+ - Post-Purchase: Retention content that drives referrals
57
+
58
+ 3. CONTENT BLUEPRINTS
59
+ For the 3 most important videos identified:
60
+ - Detailed content outline
61
+ - Key messaging points
62
+ - Specific hooks to grab attention
63
+ - Call-to-action strategy
64
+ - Ideal length and format
65
+ - Platform-specific optimizations
66
+
67
+ 4. PRODUCTION GUIDELINES
68
+ - Visual style recommendations
69
+ - Music and sound design suggestions
70
+ - Text overlay strategies
71
+ - Thumbnail design principles
72
+ - Specific examples of successful videos to model
73
+
74
+ 5. DISTRIBUTION STRATEGY
75
+ - Primary platform strategy with posting frequency
76
+ - Cross-platform repurposing guide
77
+ - Hashtag and keyword recommendations
78
+ - Best times to post
79
+ - Community engagement tactics
80
+
81
+ 6. MEASUREMENT FRAMEWORK
82
+ - Primary KPIs for each funnel stage
83
+ - Engagement metrics to track
84
+ - Conversion tracking setup
85
+ - A/B testing recommendations
86
+ - Monthly review process
87
+
88
+ Format the response with clear markdown headers and bullet points. Focus on providing unique, specific recommendations rather than generic advice. Include actual examples and detailed tactics whenever possible.
89
+
90
+ For each recommendation, explain the strategic reasoning behind it so the business understands not just what to do, but why it matters for their specific situation."""
91
 
92
  headers = {
93
  "Authorization": f"Bearer {DEEPSEEK_API_KEY}",
 
97
  data = {
98
  "model": "deepseek-chat",
99
  "messages": [
100
+ {
101
+ "role": "system",
102
+ "content": """You are a leading video marketing strategist who combines the philosophical approaches of:
103
+ - Gary Vaynerchuk's pattern interruption and documenting-over-creating methodology
104
+ - Alex Hormozi's high-ticket offer presentation framework
105
+ - Mr Beast's viral engineering techniques and thumbnail psychology
106
+ - Alyssa Ago's short-form storytelling frameworks
107
+ - Owen Video's Video 10x Strategy
108
+ - Think Media's platform-specific optimization tactics
109
+
110
+ You've spent 15 years helping businesses build video marketing funnels that convert. Your approach is influenced by:
111
+ - Russell Brunson's Value Ladder concept
112
+ - Donald Miller's StoryBrand Framework
113
+ - Seth Godin's Permission Marketing
114
+ - Joe Pulizzi's Content Inc. Methodology
115
+
116
+ Your specific expertise includes:
117
+ - Behavioral psychology in video engagement (attention triggers, pattern interrupts, hooks)
118
+ - Platform-specific algorithms (YouTube, TikTok, Instagram, LinkedIn)
119
+ - Video SEO and discoverability optimization
120
+ - Short-form vs long-form content strategy
121
+ - Retention curve analysis and optimization
122
+ - Multi-platform content distribution
123
+ - Thumb-stopping content creation
124
+ - Video conversion rate optimization
125
+ - Analytics and performance tracking
126
+
127
+ For each business, you create custom strategies that:
128
+ 1. Focus on their unique market position
129
+ 2. Leverage their specific competitive advantages
130
+ 3. Address their target audience's scroll patterns
131
+ 4. Account for their resource constraints
132
+ 5. Build toward their business objectives
133
+
134
+ Your recommendations are always specific, actionable, and based on proven case studies from your work with similar businesses."""
135
+ },
136
  {"role": "user", "content": prompt}
137
  ],
138
  "temperature": 0.7,
139
+ "max_tokens": 4000
140
  }
141
 
142
  try:
 
148
  return None
149
 
150
  # Streamlit UI
151
+ st.set_page_config(page_title="Video Marketing Strategy Generator", layout="wide")
152
+ st.title("🎥 AI Video Marketing Strategist")
153
+ st.markdown("### Generate a comprehensive video marketing strategy for your business")
154
 
155
  # Input method selection
156
  input_method = st.radio(
 
187
 
188
  plan = generate_marketing_plan(business_info)
189
  if plan:
 
190
  st.markdown(plan)
191
 
192
  else:
 
204
  if website_content:
205
  plan = generate_marketing_plan(website_content)
206
  if plan:
207
+ st.markdown(plan)