File size: 1,128 Bytes
9e5e8af
 
d7e2b99
9e5e8af
4bb3c76
 
 
 
 
 
 
 
9e5e8af
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import gradio as gr
from transformers import pipeline
title = "Story Generators"
examples = [
    ["At which point do we invent Love?"],
    ["Love is a capacity more than consciousness is universal."],
    ["See the grace of god in eachother."],
    ["Love is a capacity more than consciousness is universal."],
    ["Love is generativity when there is more energy than what they need for equilibrium."],
    ["Collections of people have agency and mass having agency at the mesoscopic level"],
    ["Having a deep human connection is an interface problem to solve."],
    ["Having a collective creates agency since we build trust in eachother."]
]
from gradio import inputs
from gradio.inputs import Textbox
from gradio import outputs

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, examples=examples).launch(share=False)