File size: 883 Bytes
390bc59
56c6169
390bc59
 
 
 
 
 
 
 
 
 
839fe82
56c6169
839fe82
56c6169
6854f2d
 
37f9e41
6854f2d
37f9e41
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr
from gradio import mix

title = "GPT2"
description = "Gradio Demo for OpenAI GPT2. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."

article = "<p style='text-align: center'><a href='https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf' target='_blank'>Language Models are Unsupervised Multitask Learners</a></p>"

examples = [
    ['Paris is the capital of']
]

io1 = gr.Interface.load("huggingface/gpt2")

io2 = gr.Interface.load("huggingface/gpt2-large")

io3 = gr.Interface.load("huggingface/gpt2-medium")

io4 = gr.Interface.load("huggingface/gpt2-xl")



mix.Parallel(io1, io2,io3,io4,inputs=gr.inputs.Textbox(lines=5, label="Input Text"),description=description,title=title,article=article, examples=examples).launch(enable_queue=True)