Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,11 +48,8 @@ def generate_reason(product_desc, channel):
|
|
| 48 |
|
| 49 |
prompt = f"""
|
| 50 |
You are a social media marketing expert.
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
Focus on: target audience, content format (e.g., Reels, videos, posts), influencer collaborations, and engagement strategies.
|
| 54 |
-
Each platform should have a distinct, actionable recommendation in marketing style, suitable for a report.
|
| 55 |
-
Do NOT include instruction text in the output.
|
| 56 |
"""
|
| 57 |
try:
|
| 58 |
out = reasoning_model(prompt, max_new_tokens=120, truncation=True)
|
|
@@ -170,7 +167,7 @@ def suggest_channels(product_desc, region_code):
|
|
| 170 |
reason = generate_reason(product_desc, channel)
|
| 171 |
|
| 172 |
# Build a search query to find relevant influencers and content.
|
| 173 |
-
query = f"top {channel}
|
| 174 |
site_filter = channel.lower() + ".com" if channel != "YouTube" else None
|
| 175 |
|
| 176 |
# Get relevant links from the respective search API.
|
|
|
|
| 48 |
|
| 49 |
prompt = f"""
|
| 50 |
You are a social media marketing expert.
|
| 51 |
+
Based on the following product, write a brief, actionable marketing strategy for the {channel} platform. Focus on the content format, target audience, and potential influencer collaborations.
|
| 52 |
+
Product: {product_desc}
|
|
|
|
|
|
|
|
|
|
| 53 |
"""
|
| 54 |
try:
|
| 55 |
out = reasoning_model(prompt, max_new_tokens=120, truncation=True)
|
|
|
|
| 167 |
reason = generate_reason(product_desc, channel)
|
| 168 |
|
| 169 |
# Build a search query to find relevant influencers and content.
|
| 170 |
+
query = f"top {channel} content and influencers for {product_desc} in {region_code}"
|
| 171 |
site_filter = channel.lower() + ".com" if channel != "YouTube" else None
|
| 172 |
|
| 173 |
# Get relevant links from the respective search API.
|