Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,13 @@ tokenizer = GPT2Tokenizer.from_pretrained(
|
|
11 |
shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('micrem73/GePpeTto-finetuned-bolo2.0'),
|
12 |
tokenizer='LorenzoDeMattei/GePpeTto',
|
13 |
do_sample=True,
|
14 |
-
max_length=100,
|
15 |
top_k=50,
|
16 |
top_p=0.95,
|
17 |
repetition_penalty=9.5,
|
18 |
temperature = 1.2 )
|
19 |
|
20 |
def generator(inizia_la_storia = ''):
|
21 |
-
shroom_result = shroom_generator(inizia_la_storia, max_length=
|
22 |
return shroom_result[0]["generated_text"]
|
23 |
|
24 |
|
|
|
11 |
shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('micrem73/GePpeTto-finetuned-bolo2.0'),
|
12 |
tokenizer='LorenzoDeMattei/GePpeTto',
|
13 |
do_sample=True,
|
|
|
14 |
top_k=50,
|
15 |
top_p=0.95,
|
16 |
repetition_penalty=9.5,
|
17 |
temperature = 1.2 )
|
18 |
|
19 |
def generator(inizia_la_storia = ''):
|
20 |
+
shroom_result = shroom_generator(inizia_la_storia, max_length=80)
|
21 |
return shroom_result[0]["generated_text"]
|
22 |
|
23 |
|