bizvideoschool's picture
Update app.py
bee0dda
raw
history blame
1.18 kB
import streamlit as st
import openai
# OpenAI API Key Setup
openai.api_key = st.secrets["YOUR_OPENAI_API_KEY"]
st.title("Holiday Video Script Generator for Real Estate Agents")
# Collecting User Inputs
agent_name = st.text_input("Your Name")
agency_name = st.text_input("Your Agency")
target_audience = st.text_input("Target Audience")
video_type = st.selectbox("Type of Video", ["Community Engagement", "Personalized Messages", "Local Highlights", "Market Insights", "Year in Review", "Home Decoration/Staging Tips"])
personal_anecdotes = st.text_area("Personal Anecdotes/Success Stories")
local_features = st.text_area("Local Community Features")
market_statistics = st.text_area("Real Estate Market Statistics")
if st.button('Generate Script'):
user_input = f"Generate a one-minute holiday video script for a real estate agent. Agent's Name: {agent_name}. Agency: {agency_name}. Target Audience: {target_audience}. Video Type: {video_type}. Include: {personal_anecdotes}, {local_features}, {market_statistics}."
response = openai.Completion.create(
model="gpt-4",
prompt=user_input,
max_tokens=500
)
st.write(response.choices[0].text)