Shahadbal commited on
Commit
c74988f
·
verified ·
1 Parent(s): 4dd81ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=150, num_return_sequences=1)
15
- description = results[0]['generated_text']
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()