Spaces:
Sleeping
Sleeping
un-index
commited on
Commit
·
1ff347c
1
Parent(s):
6f2ca28
app.py
CHANGED
|
@@ -1,21 +1,21 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
-
import gradio as gr
|
| 16 |
|
| 17 |
-
def greet(name):
|
| 18 |
-
|
| 19 |
|
| 20 |
-
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 21 |
-
iface.launch()
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
|
| 3 |
+
title = "GPT-J-6B"
|
| 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 |
+
gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", api_key="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",
|
| 12 |
+
inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
|
| 13 |
+
title=title, examples=examples).launch();
|
| 14 |
|
| 15 |
+
# import gradio as gr
|
| 16 |
|
| 17 |
+
# def greet(name):
|
| 18 |
+
# return "Hello " + name + "!!"
|
| 19 |
|
| 20 |
+
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 21 |
+
# iface.launch()
|