update categories to add Buzz
This commit is contained in:
+3
-3
@@ -663,7 +663,7 @@ def generate_category_from_summary(summary):
|
||||
model=LIGHT_TASK_MODEL,
|
||||
messages=[
|
||||
{"role": "system", "content": (
|
||||
"Based on this summary, select the most relevant category from: Food, Culture, Trends, Health, Lifestyle, Drink, Eats. "
|
||||
"Based on this summary, select the most relevant category from: Buzz, Trends, Lifestyle, Culture, Health, Drink, Food, Eats. "
|
||||
"Return only the category name."
|
||||
)},
|
||||
{"role": "user", "content": summary}
|
||||
@@ -672,7 +672,7 @@ def generate_category_from_summary(summary):
|
||||
)
|
||||
category = response.choices[0].message.content.strip()
|
||||
logging.info(f"Generated category: {category}")
|
||||
return category if category in ["Food", "Culture", "Trends", "Health", "Lifestyle", "Drink", "Eats"] else "Trends"
|
||||
return category if category in ["Buzz", "Trends", "Lifestyle", "Culture", "Health", "Drink", "Food", "Eats"] else "Trends"
|
||||
except Exception as e:
|
||||
logging.error(f"Category generation failed: {e}")
|
||||
return "Trends"
|
||||
@@ -1637,7 +1637,7 @@ def prepare_post_data(summary, title, main_topic=None):
|
||||
# Select a full author dictionary from AUTHORS (already imported from foodie_config)
|
||||
author = random.choice(AUTHORS)
|
||||
|
||||
categories = ["Food", "Trends", "Eats", "Culture"]
|
||||
categories = ["Buzz", "Trends", "Lifestyle", "Culture", "Health", "Drink", "Food", "Eats"]
|
||||
category = random.choice(categories)
|
||||
|
||||
post_data = {
|
||||
|
||||
Reference in New Issue
Block a user