Download app.py from mpolanco/gpt2: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/spaces/mpolanco/gpt2/resolve/main/app.py
- Command line
-
hf download hf://spaces/mpolanco/gpt2/app.py
-
curl -L -o app.py https://huggingface.co/spaces/mpolanco/gpt2/resolve/main/app.py
403 Bytes
| import gradio as gr | |
| from gradio import inputs | |
| description = "Shakespeare generation with GPT-2" | |
| interface = gr.Interface.load("huggingface/lewtun/distilgpt2-finetuned-shakespeare", | |
| title = "Shakespeare Generation with GPT-2", | |
| inputs = [ | |
| gr.inputs.Textbox(lines=7, label="Story"), | |
| ], | |
| description=description, | |
| examples=[["HAMLET: To be or not to be"]] | |
| ) | |
| interface.launch(share=True) |