EricLam commited on
Commit
7e81cb5
1 Parent(s): e22b411

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -1,3 +1,20 @@
1
  import gradio as gr
2
 
3
  gr.Interface.load("huggingface/EleutherAI/gpt-j-6B",title="can i help u",description="Input your text,submit and the machine will output test").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
  gr.Interface.load("huggingface/EleutherAI/gpt-j-6B",title="can i help u",description="Input your text,submit and the machine will output test").launch()
4
+ import gradio as gr
5
+ from gradio import inputs
6
+ from gradio.inputs import Textbox
7
+ from gradio import outputs
8
+ from transformers import pipeline
9
+
10
+ title = "Next Sentence Generator"
11
+ description = "Try this text generator!"
12
+ examples = [
13
+ ["Zoe Kwan is a 20-year old singer and songwriter who has taken Hong Kong’s music scene by storm."],
14
+ ["Zoe’s big break came when the godfather of Cantopop Sam Hui stumbled upon a YouTube video of Zoe singing."]
15
+ ]
16
+ generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B")
17
+ generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
18
+ generator1 = gr.Interface.load("huggingface/gpt2-large")
19
+
20
+ gr.Parallel(generator1, generator2, generator3, inputs=gr.inputs.Textbox(lines=5, label="Enter a sentence to get another sentence."), title=title, description=description, examples=examples).launch(share=False, enable_queue=True)