gradio/demo/gpt2_xl/run.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
418 B
Python
Raw Normal View History

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,
2022-03-29 05:22:49 +08:00
)
if __name__ == "__main__":
demo.launch()