File size: 921 Bytes
173b58d
a04d99e
cc8b13a
173b58d
f78a42f
a04d99e
 
173b58d
f78a42f
1
2
3
4
5
6
7
8
9
import gradio as gr
title = "papuGaPT2 (Polish GPT2) language model demo"
description = "This demo showcases the text generation capabilities for papuGaPT2, a GPT2 model pre-trained from scratch using Polish subset of the multilingual Oscar corpus. To use it, add your text to 'Input Text' box, or click one of the below examples to load them and clik 'Submit' button. The model will generate text based on the entered text (prompt). For more information including dataset, training and evaluation procedure, intended use, limitations and bias analysis see the model card at https://huggingface.co/flax-community/papuGaPT2)"
examples = [
    ["Najsmaczniejszy owoc to"],
    ["Największym polskim poetą był"],
    ["Cześć mam na imię"]
]
gr.Interface.load("huggingface/flax-community/papuGaPT2", inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title, description=description, examples=examples).launch()