Skip to content

Commit 9436726

Browse files
committed
updates
1 parent d4e7706 commit 9436726

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

product_pipeline.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from util.ai_util import ai_util
1010
from util.image_util import create_text_image
1111
from res.models.tshirt import tshirt_from_ai_list
12-
from res.prompts.tshirt import user_message
12+
from res.prompts.tshirt import user_message, blueprint_6_description
1313
from util.github_util import GithubUploader
1414

1515
from dotenv import load_dotenv
@@ -20,7 +20,7 @@
2020
# Set up argument parser
2121
parser = argparse.ArgumentParser(description="Utility to handle patterns and ideas.")
2222
parser.add_argument('-p', '--patterns', type=int, default=3,
23-
help='Number of patterns, default is 10')
23+
help='Number of patterns, default is 3')
2424
parser.add_argument('idea', type=str,
2525
help='The Idea to generate patterns for')
2626

@@ -48,10 +48,10 @@ def main():
4848
response = ai.chat(
4949
messages=[
5050
{"role": "system", "content": "You are a helpful chatbot"},
51-
{"role": "user", "content": user_message % (number_of_patterns, idea)}
51+
{"role": "user", "content": user_message % (number_of_patterns, idea) + blueprint_6_description},
5252
],
5353
output_model=tshirt_from_ai_list,
54-
) #TODO - TEST TO MAKE SURE THIS WORKS using both f string and %s formatting
54+
)
5555

5656
# Parse the response
5757
parsed_response = json.loads(response)

res/prompts/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .tshirt import general_product_description, user_message
1+
from .tshirt import user_message, blueprint_6_description

res/prompts/tshirt.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# General Product Description for blueprint 6
2-
general_product_description = "Unisex Gildan T-Shirt - Made with medium fabric (5.3 oz/yd² (180 g/m²)) consisting of 100% cotton for year-round comfort that is sustainable and highly durable. The classic fit of this shirt ensures a comfy, relaxed wear while the crew neckline adds that neat, timeless look that can blend into any occasion, casual or semi-formal."
2+
blueprint_6_description = """
3+
General Product Description:
4+
Unisex Gildan T-Shirt - Made with medium fabric (5.3 oz/yd² (180 g/m²)) consisting of 100% cotton for year-round comfort that is sustainable and highly durable. The classic fit of this shirt ensures a comfy, relaxed wear while the crew neckline adds that neat, timeless look that can blend into any occasion, casual or semi-formal.
5+
"""
36

47
# AI prompt
5-
user_message = f"""
6-
I have a t-shirt business and I need your help to come up with creative, fun, unique, and interesting t-shirt designs. I would like you to generate %s patterns for %s. The title is the name of the pattern and it will be displayed as the product name. The description is a short description of the product, and the description of the item it will be printed on can be found below. You can use parts of this in the description, but keep it witty yet classy. The tshirt_text is the text that will be printed on the t-shirt. This field is your time to shine, I believe in your ability to help me create amazing products! The marketing_tags are the tags that will be used to market the t-shirt, these should be relevant to the idea and usable for marketing purposes. Please make sure that the patterns are unique and creative. Thank you!
7-
8-
General Product Description:
9-
{general_product_description}
8+
user_message = """
9+
I have a t-shirt business and I need your help to come up with creative, fun, unique, and interesting t-shirt designs. I would like you to generate %s patterns relating tho this idea: %s. The title is the name of the pattern and it will be displayed as the product name. The description is a short description of the product, and the description of the item it will be printed on can be found below. You can use parts of this in the description, but keep it witty yet classy. The tshirt_text is the text that will be printed on the t-shirt. This field is your time to shine, I believe in your ability to help me create amazing products! The marketing_tags are the tags that will be used to market the t-shirt, these should be relevant to the idea and usable for marketing purposes. Please make sure that the patterns are unique and creative. Thank you!
1010
"""

0 commit comments

Comments
 (0)