Spaces:
Sleeping
Sleeping
Upload BotSimulator.py
Browse files- BotSimulator.py +3 -3
BotSimulator.py
CHANGED
@@ -632,14 +632,14 @@ class TootBot:
|
|
632 |
|
633 |
tokens_str = ", ".join(image_tokens)
|
634 |
for row in range(0, len(self.dataset_df), every_n):
|
635 |
-
if img_mode == "keyword":
|
636 |
keyphrases = self.keyword_model(self.dataset_df["answer"][row])
|
637 |
image_prompt = image_subtoken + " ".join(keyphrases) + ", " + tokens_str
|
638 |
|
639 |
-
elif img_mode == "default":
|
640 |
image_prompt = image_subtoken + self.topic.strip() + ", " + tokens_str
|
641 |
|
642 |
-
elif img_mode == "news":
|
643 |
story_prompt = self.story_prescript + self.topic.strip()
|
644 |
story = self.create_story(story_prompt, model=text_model_name)
|
645 |
story = story.choices[0].message.content.strip()
|
|
|
632 |
|
633 |
tokens_str = ", ".join(image_tokens)
|
634 |
for row in range(0, len(self.dataset_df), every_n):
|
635 |
+
if img_mode.lower() == "keyword":
|
636 |
keyphrases = self.keyword_model(self.dataset_df["answer"][row])
|
637 |
image_prompt = image_subtoken + " ".join(keyphrases) + ", " + tokens_str
|
638 |
|
639 |
+
elif img_mode.lower() == "default":
|
640 |
image_prompt = image_subtoken + self.topic.strip() + ", " + tokens_str
|
641 |
|
642 |
+
elif img_mode.lower() == "news":
|
643 |
story_prompt = self.story_prescript + self.topic.strip()
|
644 |
story = self.create_story(story_prompt, model=text_model_name)
|
645 |
story = story.choices[0].message.content.strip()
|