papuGaPT2 / app_gradio.py
miwojc's picture
Update app_gradio.py
a90542c
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()