Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,13 @@ dante = pipeline('text-generation',model='.', tokenizer='GroNLP/gpt2-small-itali
|
|
9 |
title = "Dante's style text generation"
|
10 |
description = """
|
11 |
Play with Dante's style text generation. Base model is gpt-2-small-italian, fine-tuned on Dante Alighieri's corpus.
|
|
|
|
|
12 |
|
13 |
def get_text(input):
|
14 |
generated = dante(input, max_length=128)[0]['generated_text']
|
15 |
generated = grammatical_cleaning(generated)
|
16 |
return generated
|
17 |
|
18 |
-
iface = gr.Interface(fn=get_text, inputs="text", outputs="text",examples=sample_text, description=description)
|
19 |
iface.launch()
|
|
|
9 |
title = "Dante's style text generation"
|
10 |
description = """
|
11 |
Play with Dante's style text generation. Base model is gpt-2-small-italian, fine-tuned on Dante Alighieri's corpus.
|
12 |
+
"""
|
13 |
+
examples = ["Io mi volsi ", "Quand'anche ch'io volli "]
|
14 |
|
15 |
def get_text(input):
|
16 |
generated = dante(input, max_length=128)[0]['generated_text']
|
17 |
generated = grammatical_cleaning(generated)
|
18 |
return generated
|
19 |
|
20 |
+
iface = gr.Interface(fn=get_text, inputs="text", outputs="text",title=title, examples=sample_text, description=description)
|
21 |
iface.launch()
|