File size: 481 Bytes
5767a2a
ce52f4d
5767a2a
ce52f4d
 
3d41432
ce52f4d
 
3d41432
ce52f4d
1
2
3
4
5
6
7
8
9
10
import gradio as gr
from gradio.mix import Series

title = "Chinese Text Generator and Translator"
description = "Input Chinese language text, submit and the machine will generate additional English language text"

translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-zh-en")
model1 = gr.Interface.load("huggingface/ckiplab/gpt2-base-chinese")

gr.Series(model1, translator, inputs=gr.Textbox(lines=5, label="Input Text"), title=title, description=description).launch()