Spaces:
Sleeping
Sleeping
Tune-up
Browse files
app.py
CHANGED
@@ -100,14 +100,14 @@ def transform_text(desc, openai_api_key, temperature, llm_chain, num_words, form
|
|
100 |
elif literary_style == "Knock-knock":
|
101 |
literary_style_str = "as a very funny knock-knock joke, "
|
102 |
|
103 |
-
character_str = ""
|
104 |
if character != CHARACTER_DEFAULT:
|
105 |
if character == "The Old Woman Who Lived In A Shoe":
|
106 |
-
character_str = "by the Old Woman Who Lived In A Shoe, "
|
107 |
elif character == "Mary Had A Little Lamb":
|
108 |
-
character_str = "by Mary from Mary Had A Little Lamb, "
|
109 |
elif character == "Humpty-Dumpty":
|
110 |
-
character_str = "by Humpty Dumpty, "
|
111 |
|
112 |
formatted_prompt = PROMPT_TEMPLATE.format(
|
113 |
original_words=desc,
|
@@ -190,7 +190,7 @@ with block:
|
|
190 |
inputs=[formality_radio, formality_state],
|
191 |
outputs=[formality_state])
|
192 |
|
193 |
-
character_radio = gr.Radio(label="
|
194 |
value=CHARACTER_DEFAULT)
|
195 |
formality_radio.change(update_foo,
|
196 |
inputs=[character_radio, character_state],
|
|
|
100 |
elif literary_style == "Knock-knock":
|
101 |
literary_style_str = "as a very funny knock-knock joke, "
|
102 |
|
103 |
+
character_str = "as if written by The Old Lady Who Swalled A Fly"
|
104 |
if character != CHARACTER_DEFAULT:
|
105 |
if character == "The Old Woman Who Lived In A Shoe":
|
106 |
+
character_str = "as if written by the Old Woman Who Lived In A Shoe, "
|
107 |
elif character == "Mary Had A Little Lamb":
|
108 |
+
character_str = "as if written by Mary from Mary Had A Little Lamb, "
|
109 |
elif character == "Humpty-Dumpty":
|
110 |
+
character_str = "as if written by Humpty Dumpty, "
|
111 |
|
112 |
formatted_prompt = PROMPT_TEMPLATE.format(
|
113 |
original_words=desc,
|
|
|
190 |
inputs=[formality_radio, formality_state],
|
191 |
outputs=[formality_state])
|
192 |
|
193 |
+
character_radio = gr.Radio(label="As if written by:", choices=["The Old Lady Who Swallowed A Fly", "The Old Woman Who Lived In A Shoe", "Mary Had A Little Lamb", "Humpty-Dumpty"],
|
194 |
value=CHARACTER_DEFAULT)
|
195 |
formality_radio.change(update_foo,
|
196 |
inputs=[character_radio, character_state],
|