Spaces:
Runtime error
Runtime error
File size: 612 Bytes
87c7b93 43c8f77 87c7b93 85676ee 23e95e5 43c8f77 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import gradio as gr
from gradio.mix import Series
translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-zh-en")
model1 = gr.Interface.load("huggingface/ckiplab/gpt2-base-chinese")
#model2 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
title = "Chinese Text Generator and Chinese to English Translator"
description = "Input Chinese language text, submit and the machine will generate additional Chinese language text and translate that text into English."
gr.Series(model1, translator, inputs=gr.Textbox(lines=5, label="Input Text"), title=title, description=description).launch(debug=True) |