Mutugi commited on
Commit
0508ca8
·
1 Parent(s): 4444d33

app file added

Browse files
Files changed (1) hide show
  1. app.py +28 -0
app.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+
4
+ title = "GPT-J-6B"
5
+
6
+ description = "Gradio Demo for GPT-J 6B, a transformer model trained \
7
+ using Ben Wang's Mesh Transformer JAX. 'GPT-J' refers to the class of \
8
+ model, while '6B' represents the number of trainable parameters. \
9
+ To use it, simply add your text, or click one of the examples to load them. \
10
+ I've used the API on this Space to deploy the GPT-J-6B model on a Telegram bot. \
11
+ Link to blog post below 👇"
12
+
13
+ article = "<p style='text-align: center'> \
14
+ <a href='https://dicksonneoh.com/portfolio/deploy_gpt_hf_models_on_telegram/' \
15
+ target='_blank'>Blog post</a></p>"
16
+
17
+ examples = [
18
+ ['The tower is 324 metres (1,063 ft) tall,'],
19
+ ["The Moon's orbit around Earth has"],
20
+ ["The smooth Borealis basin in the Northern Hemisphere covers 40%"]
21
+ ]
22
+
23
+ gr.Interface.load("huggingface/EleutherAI/gpt-j-6B",
24
+ inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
25
+ title=title,description=description,
26
+ article=article,
27
+ examples=examples,
28
+ enable_queue=True).launch()