Spaces:
Sleeping
Sleeping
editorial changes
Browse files
app.py
CHANGED
@@ -100,7 +100,7 @@ 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 = "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, "
|
@@ -190,12 +190,6 @@ with block:
|
|
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 |
-
character_radio.change(update_foo,
|
196 |
-
inputs=[character_radio, character_state],
|
197 |
-
outputs=[character_state])
|
198 |
-
|
199 |
translate_to_radio = gr.Radio(label="Translate to:", choices=[
|
200 |
TRANSLATE_TO_DEFAULT, "Arabic", "British English", "Chinese (Simplified)", "Chinese (Traditional)",
|
201 |
"Czech", "Danish", "Dutch", "emojis", "English", "Finnish", "French", "Gen Z slang", "German", "Greek",
|
@@ -216,11 +210,18 @@ with block:
|
|
216 |
inputs=[literary_style_radio, literary_style_state],
|
217 |
outputs=[literary_style_state])
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
gr.Examples(
|
220 |
examples=[
|
221 |
-
"
|
222 |
-
"
|
223 |
-
"
|
224 |
],
|
225 |
inputs=request
|
226 |
)
|
|
|
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, "
|
|
|
190 |
inputs=[formality_radio, formality_state],
|
191 |
outputs=[formality_state])
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
translate_to_radio = gr.Radio(label="Translate to:", choices=[
|
194 |
TRANSLATE_TO_DEFAULT, "Arabic", "British English", "Chinese (Simplified)", "Chinese (Traditional)",
|
195 |
"Czech", "Danish", "Dutch", "emojis", "English", "Finnish", "French", "Gen Z slang", "German", "Greek",
|
|
|
210 |
inputs=[literary_style_radio, literary_style_state],
|
211 |
outputs=[literary_style_state])
|
212 |
|
213 |
+
|
214 |
+
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"],
|
215 |
+
value=CHARACTER_DEFAULT)
|
216 |
+
character_radio.change(update_foo,
|
217 |
+
inputs=[character_radio, character_state],
|
218 |
+
outputs=[character_state])
|
219 |
+
|
220 |
gr.Examples(
|
221 |
examples=[
|
222 |
+
"My armpits are sweating gravy",
|
223 |
+
"My skull is filled with solid bone",
|
224 |
+
"Something underneath the house smells horrible",
|
225 |
],
|
226 |
inputs=request
|
227 |
)
|