Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ openai.api_key = os.environ.get('openai-api')
|
|
| 7 |
|
| 8 |
#Functions
|
| 9 |
def generate_story(character1, character2, character3, character4, localizer, agefor, language, wordstouse):
|
| 10 |
-
agefor = min(max(agefor, 2), 12) # Ensure agefor is between 0 and
|
| 11 |
|
| 12 |
# Define the prompt
|
| 13 |
prompt = f'A story about {character1}, {character2}, {character3}, and {character4}, set in {localizer}.' \
|
|
|
|
| 7 |
|
| 8 |
#Functions
|
| 9 |
def generate_story(character1, character2, character3, character4, localizer, agefor, language, wordstouse):
|
| 10 |
+
agefor = min(max(agefor, 2), 12) # Ensure agefor is between 0 and 12
|
| 11 |
|
| 12 |
# Define the prompt
|
| 13 |
prompt = f'A story about {character1}, {character2}, {character3}, and {character4}, set in {localizer}.' \
|