Spaces:
Runtime error
Runtime error
azaninello
commited on
Commit
•
bf856c8
1
Parent(s):
c412150
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,10 @@ tokenizer = GPT2Tokenizer.from_pretrained(
|
|
10 |
|
11 |
shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('LorenzoDeMattei/GePpeTto'),
|
12 |
tokenizer='LorenzoDeMattei/GePpeTto',
|
13 |
-
|
|
|
|
|
|
|
14 |
|
15 |
def generator(inizia_la_storia = ''):
|
16 |
shroom_result = shroom_generator(inizia_la_storia, max_length=120)
|
|
|
10 |
|
11 |
shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('LorenzoDeMattei/GePpeTto'),
|
12 |
tokenizer='LorenzoDeMattei/GePpeTto',
|
13 |
+
do_sample=True,
|
14 |
+
max_length=100,
|
15 |
+
top_k=50,
|
16 |
+
top_p=0.95,)
|
17 |
|
18 |
def generator(inizia_la_storia = ''):
|
19 |
shroom_result = shroom_generator(inizia_la_storia, max_length=120)
|