mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
921716f618
* fixed visibility error in notebooks in github * Delete fixNotebooks.py deleted script used to fix notebooks * Update generate_notebooks.py fixed a small bug that prevented visibility of notebooks in GitHub
1.0 KiB
1.0 KiB
Gradio Demo: gpt2_xl¶
In [ ]:
!pip install -q gradio
In [ ]:
import gradio as gr title = "gpt2-xl" examples = [ ["The tower is 324 metres (1,063 ft) tall,"], ["The Moon's orbit around Earth has"], ["The smooth Borealis basin in the Northern Hemisphere covers 40%"], ] demo = gr.load( "huggingface/gpt2-xl", inputs=gr.Textbox(lines=5, max_lines=6, label="Input Text"), title=title, examples=examples, ) if __name__ == "__main__": demo.launch()