Spaces:
Running
Running
RafaelJaime
commited on
Upload app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def measure_performance(func):
|
|
28 |
@measure_performance
|
29 |
def generate_story_text(theme):
|
30 |
prompt = f"Tell me a storie about {theme}"
|
31 |
-
story = generate_story_pipe(prompt, max_length=400, num_return_sequences=1, temperature=0.7, do_sample=True, repetition_penalty=3.0, eos_token_id=generate_story_pipe.model.config.eos_token_id, pad_token_id=generate_story_pipe.model.config.pad_token_id)
|
32 |
generated_story = story[0]["generated_text"]
|
33 |
return generated_story
|
34 |
|
|
|
28 |
@measure_performance
|
29 |
def generate_story_text(theme):
|
30 |
prompt = f"Tell me a storie about {theme}"
|
31 |
+
story = generate_story_pipe(prompt, max_length=400, num_return_sequences=1, temperature=0.7, do_sample=True, repetition_penalty=3.0, eos_token_id=generate_story_pipe.model.config.eos_token_id, pad_token_id=generate_story_pipe.model.config.pad_token_id, truncation=True, padding=True)
|
32 |
generated_story = story[0]["generated_text"]
|
33 |
return generated_story
|
34 |
|