bizvideoschool commited on
Commit
b724b7a
1 Parent(s): a452991

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -6
app.py CHANGED
@@ -4,22 +4,36 @@ import openai
4
  # Access the OpenAI API key from Hugging Face Spaces secrets
5
  openai.api_key = st.secrets["OPENAI_API_KEY"]
6
 
7
- st.title("TikTok Video Planner for Businesses")
8
 
9
  # User inputs
10
  st.subheader("About Your Business")
11
  business_description = st.text_area("Describe Your Business", placeholder="What does your business do? What are its unique features?")
12
  target_audience = st.text_area("Target Audience", placeholder="Describe the kinds of people you want to attract (e.g., demographics, interests)")
13
 
14
- st.subheader("Video Ideas")
15
  initial_ideas = st.text_area("Initial Video Ideas", placeholder="Any initial ideas or themes you have in mind for the TikTok video?")
16
 
17
  if st.button('Generate Video Plan'):
 
 
 
 
 
 
 
 
 
 
 
 
18
  # Construct the prompt for the AI
19
- prompt_text = (
20
- f"Create a TikTok video plan for a business. Business description: {business_description}. "
21
- f"Target audience: {target_audience}. Initial video ideas: {initial_ideas}."
22
- )
 
 
23
 
24
  # Call the OpenAI API for text generation
25
  try:
 
4
  # Access the OpenAI API key from Hugging Face Spaces secrets
5
  openai.api_key = st.secrets["OPENAI_API_KEY"]
6
 
7
+ st.title("TikTok Video Planner for Real Estate Agents")
8
 
9
  # User inputs
10
  st.subheader("About Your Business")
11
  business_description = st.text_area("Describe Your Business", placeholder="What does your business do? What are its unique features?")
12
  target_audience = st.text_area("Target Audience", placeholder="Describe the kinds of people you want to attract (e.g., demographics, interests)")
13
 
14
+ st.subheader("Initial Video Ideas")
15
  initial_ideas = st.text_area("Initial Video Ideas", placeholder="Any initial ideas or themes you have in mind for the TikTok video?")
16
 
17
  if st.button('Generate Video Plan'):
18
+ # Detailed prompt for AI including the steps
19
+ ai_instructions = """
20
+ You are an AI consultant skilled in crafting TikTok video strategies for real estate agents working from their home offices. Use your understanding of engaging short-form video content to generate a single, creative video idea that can be filmed in a home office setting. The video should be under 60 seconds, suitable for TikTok. Begin with a captivating hook, provide valuable and relatable content, and conclude with a clear call to action. The plan should include a brief outline of the video structure, suggestions for visuals using the home office backdrop, and a draft script for dialogue.
21
+
22
+ Steps:
23
+ 1. Start with a strong hook that captures attention within the first few seconds.
24
+ 2. Develop a body that delivers valuable insights or showcases the agent's expertise, using props or elements available in a home office.
25
+ 3. Conclude with a compelling call to action.
26
+ 4. Provide guidance on shooting techniques that can be employed in a home office setting, like using natural lighting and office aesthetics.
27
+ 5. Write a script with a natural and engaging dialogue that resonates with the target audience.
28
+ """
29
+
30
  # Construct the prompt for the AI
31
+ prompt_text = f"""
32
+ {ai_instructions}
33
+ Business description: {business_description}.
34
+ Target audience: {target_audience}.
35
+ Initial video ideas: {initial_ideas}.
36
+ """
37
 
38
  # Call the OpenAI API for text generation
39
  try: