File size: 1,177 Bytes
bf70abc 0a480c8 c1fbddd bf70abc c1fbddd bf70abc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import streamlit as st
import openai
# OpenAI API Key Setup
openai.api_key = st.secrets["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)
|