smtsead commited on
Commit
6070942
·
verified ·
1 Parent(s): b1e0ecf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ def text2story(text):
48
  story_generator = pipeline("text-generation", model="pranavpsv/gpt2-genre-story-generator")
49
 
50
  # Generate the story with the superhero genre
51
- prompt = f"<BOS> <superhero> {text}" # Add genre tags to the prompt
52
  story = story_generator(prompt, max_length=150, num_return_sequences=1)[0]['generated_text']
53
 
54
  # Remove <BOS> and <superhero> tags from the generated story
 
48
  story_generator = pipeline("text-generation", model="pranavpsv/gpt2-genre-story-generator")
49
 
50
  # Generate the story with the superhero genre
51
+ prompt = f"<BOS> <fun superhero> {text}" # Add genre tags to the prompt
52
  story = story_generator(prompt, max_length=150, num_return_sequences=1)[0]['generated_text']
53
 
54
  # Remove <BOS> and <superhero> tags from the generated story