mrm8488 commited on
Commit
a9032a3
·
1 Parent(s): 95f5187

Add initial examples

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -1,7 +1,10 @@
1
  import gradio as gr
2
-
3
- def greet(name):
4
- return "Hello " + name + "!!"
5
-
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
1
  import gradio as gr
2
+ title = "GPT-J-6B"
3
+ description = "Gradio Demo for GPT-J 6B, a transformer model trained using Ben Wang's Mesh Transformer JAX. 'GPT-J' refers to the class of model, while '6B' represents the number of trainable parameters."
4
+ article = "<p style='text-align: center'><a href='https://github.com/kingoflolz/mesh-transformer-jax' target='_blank'>GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model</a></p>"
5
+ examples = [
6
+ ['HuggingFace is a company that '],
7
+ ["from transformers import AutoTokenizer"],
8
+ ["The smooth Borealis basin in the Northern Hemisphere covers 40%"]
9
+ ]
10
+ gr.Interface.load("huggingface/EleutherAI/gpt-j-6B", inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples,enable_queue=True).launch()