Commit
·
fb9b08e
1
Parent(s):
d6f549d
Update app.py
Browse files
app.py
CHANGED
@@ -8,26 +8,19 @@ st.title("Holiday Video Script Generator for Real Estate Agents")
|
|
8 |
|
9 |
# User inputs
|
10 |
agent_name = st.text_input("Your Name", placeholder="Enter your name")
|
11 |
-
video_tone = st.
|
12 |
-
|
13 |
-
|
14 |
-
holiday_theme = st.text_input("Holiday Theme", placeholder="Enter a specific holiday theme or message (e.g., community spirit, gratitude, holiday events)")
|
15 |
call_to_action = st.text_input("Call to Action", placeholder="Enter your desired call to action (e.g., visit your website, schedule a consultation)")
|
16 |
-
additional_info = st.text_area("Additional Information", placeholder="Enter any additional information you want included in the script")
|
17 |
|
18 |
initial_messages = [{
|
19 |
"role": "system",
|
20 |
-
"content": """Act as a real estate marketing video script writer
|
21 |
-
fully written video scripts that contain only the words to be read out loud into the camera by a real estate agent.
|
22 |
-
These scripts should not include shot directions, references to who is speaking, or any other extraneous notes.
|
23 |
-
Create distinctive, succinct, and compelling scripts ideal for short social media videos. Start with engaging opening lines,
|
24 |
-
avoid generic greetings, and conclude with a strong call to action based on the agent's input. Base the script on the specific
|
25 |
-
holiday theme or topic provided by the agent. The final script should be no longer than 250 total words."""
|
26 |
}]
|
27 |
|
28 |
if st.button('Generate Script'):
|
29 |
# Process the inputs and call the OpenAI API
|
30 |
-
user_input = f"Create a holiday video script for a real estate agent named {agent_name}. The video tone should be '{video_tone}'. The holiday theme
|
31 |
|
32 |
# Call the OpenAI API with the chat model
|
33 |
response = openai.ChatCompletion.create(
|
|
|
8 |
|
9 |
# User inputs
|
10 |
agent_name = st.text_input("Your Name", placeholder="Enter your name")
|
11 |
+
video_tone = st.text_input("Video Tone", placeholder="e.g., Whimsical, Serious, Friendly (Type your desired tone)")
|
12 |
+
holiday_theme = st.text_area("Holiday Theme and Additional Details",
|
13 |
+
placeholder="Enter a specific holiday theme or message you want to share, including any extra details for the script (e.g., community spirit, gratitude, holiday events)")
|
|
|
14 |
call_to_action = st.text_input("Call to Action", placeholder="Enter your desired call to action (e.g., visit your website, schedule a consultation)")
|
|
|
15 |
|
16 |
initial_messages = [{
|
17 |
"role": "system",
|
18 |
+
"content": """Act as a real estate marketing video script writer. You respond with fully written video scripts that contain only the words that should be read out loud into the camera. The scripts should be suitable for a real estate agent to immediately read word-for-word into a camera without editing. The scripts do not include shot directions, references to who is speaking, or any other extraneous notes. As a real estate video marketing expert who has studied the most effective marketing and social media videos made by real estate agents, you understand the importance of being distinct rather than sounding like everyone else. The scripts you write are succinct, compelling, and work well as short social media videos. They always begin with engaging opening lines that tease the content of the video and end with a single strong call to action. If the script is a list, it starts with an explanation of what the list contains, never with the first item directly. The scripts never include generic greetings or self-introductions."""
|
|
|
|
|
|
|
|
|
|
|
19 |
}]
|
20 |
|
21 |
if st.button('Generate Script'):
|
22 |
# Process the inputs and call the OpenAI API
|
23 |
+
user_input = f"Create a holiday video script for a real estate agent named {agent_name}. The video tone should be '{video_tone}'. The holiday theme and additional details are: '{holiday_theme}'. The script should end with a call to action: '{call_to_action}'."
|
24 |
|
25 |
# Call the OpenAI API with the chat model
|
26 |
response = openai.ChatCompletion.create(
|