singh5587 commited on
Commit
0d77380
1 Parent(s): 8186239

create app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ title = "GPT-J-6B"
4
+
5
+ description = "Gradio Demo for GPT-J 6B, a transformer model trained \
6
+ using Ben Wang's Mesh Transformer JAX. 'GPT-J' refers to the class of \
7
+ model, while '6B' represents the number of trainable parameters. \
8
+ To use it, simply add your text, or click one of the examples to load them. \
9
+ "
10
+
11
+
12
+
13
+ examples = [
14
+ ['The tower is 324 metres (1,063 ft) tall,'],
15
+ ["The Mars's orbit around Sun has"],
16
+ ["The science and the math combination has"],
17
+ ["The smooth Borealis basin in the Northern Hemisphere covers 40%"]
18
+ ]
19
+
20
+ gr.Interface.load("huggingface/EleutherAI/gpt-j-6B",
21
+ inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
22
+ title=title,description=description,
23
+
24
+ examples=examples,
25
+ enable_queue=True).launch()