Spaces:
Sleeping
Sleeping
Disable example
Browse files- brand_sheriff/app.py +5 -2
- brand_sheriff/prompting.py +1 -0
brand_sheriff/app.py
CHANGED
@@ -18,9 +18,12 @@ def gradio_history_to_openai_history(gradio_history: list[list[str]]):
|
|
18 |
"role": "system",
|
19 |
"content": prompting.PROMPT_TEMPLATE,
|
20 |
},
|
21 |
-
{"role": "user", "content": prompting.EXAMPLE_INPUT},
|
22 |
-
{"role": "assistant", "content": prompting.EXAMPLE_OUTPUT},
|
23 |
]
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
for gradio_message in gradio_history:
|
26 |
openai_history.append({"role": "user", "content": gradio_message[0]})
|
|
|
18 |
"role": "system",
|
19 |
"content": prompting.PROMPT_TEMPLATE,
|
20 |
},
|
|
|
|
|
21 |
]
|
22 |
+
if prompting.USE_EXAMPLE:
|
23 |
+
openai_history += [
|
24 |
+
{"role": "user", "content": prompting.EXAMPLE_INPUT},
|
25 |
+
{"role": "assistant", "content": prompting.EXAMPLE_OUTPUT},
|
26 |
+
]
|
27 |
|
28 |
for gradio_message in gradio_history:
|
29 |
openai_history.append({"role": "user", "content": gradio_message[0]})
|
brand_sheriff/prompting.py
CHANGED
@@ -6,3 +6,4 @@ with (this_dir.parent / "meta_prompt.txt").open() as f:
|
|
6 |
|
7 |
EXAMPLE_INPUT = "write an instagram post about hiring new designers"
|
8 |
EXAMPLE_OUTPUT = "ππ Hey innovators! Are you a designer who's eager to dive into the frontier of AI? π€ AIxDesign is expanding, and we're searching for creative minds who dream in code, design, and above all, possibility! π‘π¦ We're more than a team β we're a community reimagining the AI landscape beyond its corporate roots. πJoin us, bring your expertise, creativity, and make a lasting impact. And hey, we're all for slowing down, sharing a meme, and having a hearty laugh while reshaping the AI world! π¨π Apply now and let's create, care, and crack up together! #AIxDesign #WeAreHiring #AIForEveryone"
|
|
|
|
6 |
|
7 |
EXAMPLE_INPUT = "write an instagram post about hiring new designers"
|
8 |
EXAMPLE_OUTPUT = "ππ Hey innovators! Are you a designer who's eager to dive into the frontier of AI? π€ AIxDesign is expanding, and we're searching for creative minds who dream in code, design, and above all, possibility! π‘π¦ We're more than a team β we're a community reimagining the AI landscape beyond its corporate roots. πJoin us, bring your expertise, creativity, and make a lasting impact. And hey, we're all for slowing down, sharing a meme, and having a hearty laugh while reshaping the AI world! π¨π Apply now and let's create, care, and crack up together! #AIxDesign #WeAreHiring #AIForEveryone"
|
9 |
+
USE_EXAMPLE = False
|