text_generator / app.py
Wootang01's picture
Update app.py
18a48e6
raw
history blame
615 Bytes
#import libraries and dependencies
import gradio as gr
from gradio.mix import Parallel Series
#instantiate variables as functions
model1 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
model2 = gr.Interface.load("huggingface/google/flan-t5-xl")
model3 = gr.Interface.load("huggingface/Wootang01/distilgpt2-finetuned-prayerjournals")
translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-zh-en")
output = gr.Parallel(model1, model2, model3).launch()
demo = gr.Series(translator, output, inputs=gr.Textbox(lines=5, label="Input Text"), title=title, description=description)
demo.launch(debug=True)