File size: 877 Bytes
105e4ca
03c6127
 
 
 
53d9e06
03c6127
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
from gradio import inputs
from gradio.inputs import Textbox
from gradio import outputs
from transformers import pipeline

title = "Next Sentence Generator"
description = "Try this text generator!"
examples = [
   ["Zoe Kwan is a 20-year old singer and songwriter who has taken Hong Kong’s music scene by storm."],
   ["Zoe’s big break came when the godfather of Cantopop Sam Hui stumbled upon a YouTube video of Zoe singing."]
]
generator2 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-2.7B")
generator3 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
generator1 = gr.Interface.load("huggingface/gpt2-large")

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)