Update app.py
Browse files
app.py
CHANGED
|
@@ -11,8 +11,8 @@ def generate_character_description(name, gender, trait, superpower):
|
|
| 11 |
f"Superpower: {superpower}. Provide a short story or background for this character.")
|
| 12 |
|
| 13 |
# Generate the description
|
| 14 |
-
results = generator(prompt, max_length=
|
| 15 |
-
description = results[
|
| 16 |
|
| 17 |
# Clean up the output by removing the prompt part from the result
|
| 18 |
return description[len(prompt):].strip()
|
|
|
|
| 11 |
f"Superpower: {superpower}. Provide a short story or background for this character.")
|
| 12 |
|
| 13 |
# Generate the description
|
| 14 |
+
results = generator(prompt, max_length=100, num_return_sequences=1)
|
| 15 |
+
description = results[1]['generated_text']
|
| 16 |
|
| 17 |
# Clean up the output by removing the prompt part from the result
|
| 18 |
return description[len(prompt):].strip()
|