Update app.py
Browse files
app.py
CHANGED
@@ -70,9 +70,7 @@ def infer_business_info_from_url(url):
|
|
70 |
"role": "user",
|
71 |
"content": f"The domain is {domain_name}. What can you infer about this business?"
|
72 |
}
|
73 |
-
]
|
74 |
-
max_tokens=200,
|
75 |
-
temperature=0.7
|
76 |
)
|
77 |
return inferred_info["choices"][0]["message"]["content"]
|
78 |
|
@@ -110,7 +108,25 @@ def generate_marketing_plan(website_content, industry, goals, budget, location,
|
|
110 |
Ensure all suggestions align with the business's strengths, and avoid generic or obvious recommendations."""
|
111 |
|
112 |
messages.append({"role": "user", "content": query})
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
# Streamlit setup
|
116 |
st.set_page_config(layout="wide")
|
|
|
70 |
"role": "user",
|
71 |
"content": f"The domain is {domain_name}. What can you infer about this business?"
|
72 |
}
|
73 |
+
]
|
|
|
|
|
74 |
)
|
75 |
return inferred_info["choices"][0]["message"]["content"]
|
76 |
|
|
|
108 |
Ensure all suggestions align with the business's strengths, and avoid generic or obvious recommendations."""
|
109 |
|
110 |
messages.append({"role": "user", "content": query})
|
111 |
+
response = openai.ChatCompletion.create(
|
112 |
+
model="gpt-4",
|
113 |
+
messages=messages
|
114 |
+
)
|
115 |
+
return response["choices"][0]["message"]["content"]
|
116 |
+
|
117 |
+
# Define initial_messages
|
118 |
+
initial_messages = [{
|
119 |
+
"role": "system",
|
120 |
+
"content": """You are a world-class marketing strategist trained by Neil Patel, David Ogilvy, and Seth Godin.
|
121 |
+
Your task is to create highly customized marketing plans based on user input. Incorporate any business location
|
122 |
+
or target areas explicitly mentioned in the website content or user-provided details into the recommendations.
|
123 |
+
Go beyond generic suggestions, and include:
|
124 |
+
- Specific, long-tail keywords to target.
|
125 |
+
- Detailed content ideas, including blogs, videos, and social media campaigns.
|
126 |
+
- Unique strategies tailored to the business's industry, goals, and location.
|
127 |
+
- Innovative advertising campaigns and emerging platform recommendations.
|
128 |
+
Ensure every suggestion is actionable and includes measurable KPIs."""
|
129 |
+
}]
|
130 |
|
131 |
# Streamlit setup
|
132 |
st.set_page_config(layout="wide")
|