Spaces:
Sleeping
Sleeping
template string commas added
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ def transform_text(desc, openai_api_key, temperature, llm_chain, num_words,
|
|
95 |
# if translate_to != TRANSLATE_TO_DEFAULT:
|
96 |
# translate_to_str = "translated to " + translate_to + ", "
|
97 |
|
98 |
-
literary_style_str = "as a poem "
|
99 |
if literary_style != LITERARY_STYLE_DEFAULT:
|
100 |
if literary_style == "Poetry":
|
101 |
literary_style_str = "as a poem, "
|
@@ -108,14 +108,14 @@ def transform_text(desc, openai_api_key, temperature, llm_chain, num_words,
|
|
108 |
elif literary_style == "Knock-knock":
|
109 |
literary_style_str = "as a very funny knock-knock joke, "
|
110 |
|
111 |
-
character_str = "as if written by The Old Lady Who Swalled A Fly"
|
112 |
if character != CHARACTER_DEFAULT:
|
113 |
if character == "The Old Woman Who Lived In A Shoe":
|
114 |
-
character_str = "as if written by the Old Woman Who Lived In A Shoe"
|
115 |
elif character == "Mary Had A Little Lamb":
|
116 |
-
character_str = "as if written by Mary from Mary Had A Little Lamb"
|
117 |
elif character == "Humpty-Dumpty":
|
118 |
-
character_str = "as if written by Humpty Dumpty"
|
119 |
|
120 |
# formatted_prompt = PROMPT_TEMPLATE.format(
|
121 |
# original_words=desc,
|
|
|
95 |
# if translate_to != TRANSLATE_TO_DEFAULT:
|
96 |
# translate_to_str = "translated to " + translate_to + ", "
|
97 |
|
98 |
+
literary_style_str = "as a poem, "
|
99 |
if literary_style != LITERARY_STYLE_DEFAULT:
|
100 |
if literary_style == "Poetry":
|
101 |
literary_style_str = "as a poem, "
|
|
|
108 |
elif literary_style == "Knock-knock":
|
109 |
literary_style_str = "as a very funny knock-knock joke, "
|
110 |
|
111 |
+
character_str = "as if written by The Old Lady Who Swalled A Fly, "
|
112 |
if character != CHARACTER_DEFAULT:
|
113 |
if character == "The Old Woman Who Lived In A Shoe":
|
114 |
+
character_str = "as if written by the Old Woman Who Lived In A Shoe, "
|
115 |
elif character == "Mary Had A Little Lamb":
|
116 |
+
character_str = "as if written by Mary from Mary Had A Little Lamb, "
|
117 |
elif character == "Humpty-Dumpty":
|
118 |
+
character_str = "as if written by Humpty Dumpty, "
|
119 |
|
120 |
# formatted_prompt = PROMPT_TEMPLATE.format(
|
121 |
# original_words=desc,
|