Spaces:
Runtime error
Runtime error
Commit ·
441d765
1
Parent(s): 2969adb
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
title = "gpt2-xl"
|
| 4 |
+
|
| 5 |
+
examples = [
|
| 6 |
+
["The tower is 324 metres (1,063 ft) tall,"],
|
| 7 |
+
["The Moon's orbit around Earth has"],
|
| 8 |
+
["The smooth Borealis basin in the Northern Hemisphere covers 40%"],
|
| 9 |
+
]
|
| 10 |
+
|
| 11 |
+
demo = gr.load(
|
| 12 |
+
"huggingface/gpt2-xl",
|
| 13 |
+
inputs=gr.Textbox(lines=5, max_lines=6, label="Input Text"),
|
| 14 |
+
title=title,
|
| 15 |
+
examples=examples,
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
if __name__ == "__main__":
|
| 19 |
+
demo.launch()
|
| 20 |
+
|
| 21 |
+
import gradio as gr
|
| 22 |
+
|
| 23 |
+
title = "gpt2-xl"
|
| 24 |
+
|
| 25 |
+
examples = [
|
| 26 |
+
["The tower is 324 metres (1,063 ft) tall,"],
|
| 27 |
+
["The Moon's orbit around Earth has"],
|
| 28 |
+
["The smooth Borealis basin in the Northern Hemisphere covers 40%"],
|
| 29 |
+
]
|
| 30 |
+
|
| 31 |
+
demo = gr.load(
|
| 32 |
+
"huggingface/gpt2-xl",
|
| 33 |
+
inputs=gr.Textbox(lines=5, max_lines=6, label="Input Text"),
|
| 34 |
+
title=title,
|
| 35 |
+
examples=examples,
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
if __name__ == "__main__":
|
| 39 |
+
demo.launch()
|
| 40 |
+
|