Spaces:
Runtime error
Runtime error
azaninello
commited on
Commit
•
70b313e
1
Parent(s):
81d2dea
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ tokenizer = GPT2Tokenizer.from_pretrained(
|
|
8 |
'LorenzoDeMattei/GePpeTto',
|
9 |
)
|
10 |
|
11 |
-
shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('
|
12 |
tokenizer='LorenzoDeMattei/GePpeTto',
|
13 |
do_sample=True,
|
14 |
max_length=100,
|
@@ -17,7 +17,7 @@ shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pr
|
|
17 |
repetition_penalty=9.5)
|
18 |
|
19 |
def generator(inizia_la_storia = ''):
|
20 |
-
shroom_result = shroom_generator(inizia_la_storia, max_length=
|
21 |
return shroom_result[0]["generated_text"]
|
22 |
|
23 |
iface = gr.Interface(fn=generator, inputs="text", outputs="text")
|
|
|
8 |
'LorenzoDeMattei/GePpeTto',
|
9 |
)
|
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,
|
|
|
17 |
repetition_penalty=9.5)
|
18 |
|
19 |
def generator(inizia_la_storia = ''):
|
20 |
+
shroom_result = shroom_generator(inizia_la_storia, max_length=420)
|
21 |
return shroom_result[0]["generated_text"]
|
22 |
|
23 |
iface = gr.Interface(fn=generator, inputs="text", outputs="text")
|