import gradio as gr from gradio.mix import Parallel, Series io1 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-1.3B") io2 = gr.Interface.load("huggingface/facebook/m2m100_418M") title = "GPT-Neo and M2M Series Demo" description = "GPT-Neo + M2M using Gradio Series for text generation and translation. First the autocompletion is done using GPT-Neo and then the text is translated using M2M. To use it, simply add your text, or click one of the examples to load them. Read more at the links below." article = "

Beyond English-Centric Multilingual Machine Translation | GPT-Neo: Large Scale Autoregressive Language Modeling with Mesh-Tensorflow

" examples = [ ['The tower is 324 metres (1,063 ft) tall,'], ["The Moon's orbit around Earth has"], ["The smooth Borealis basin in the Northern Hemisphere covers 40%"] ] Series(io1,io2, inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples).launch()