Wootang01 commited on
Commit
510a1d2
·
1 Parent(s): 12bef43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,13 +2,15 @@ import gradio as gr
2
  from gradio.mix import Series
3
 
4
  description = "Input Chinese language or English language text, submit and the machine will generate additional English language text."
 
 
5
 
6
  translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-zh-en")
7
  model1 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
8
  model2 = gr.Interface.load("huggingface/ckiplab/gpt2-base-chinese")
9
 
10
  tg_demo = gr.Series(translator, model1, inputs=gr.Textbox(lines=5, label="Input Text"), description=description)
11
- gt_demo = gr.Series(model2, translator, inputs=gr.Textbox(lines=5, label="Input Text"), description=description)
12
 
13
  demo = gr.TabbedInterface([tg_demo, gt_demo], ["Chinese and English Translator to Text Generator GPT-J-6B", "Chinese Language Generator GPT-2 to Chinese to English Translator"])
14
 
 
2
  from gradio.mix import Series
3
 
4
  description = "Input Chinese language or English language text, submit and the machine will generate additional English language text."
5
+ description1 = "Input Chinese language text, submit and the machine will generate additional English language text."
6
+
7
 
8
  translator = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-zh-en")
9
  model1 = gr.Interface.load("huggingface/EleutherAI/gpt-j-6B")
10
  model2 = gr.Interface.load("huggingface/ckiplab/gpt2-base-chinese")
11
 
12
  tg_demo = gr.Series(translator, model1, inputs=gr.Textbox(lines=5, label="Input Text"), description=description)
13
+ gt_demo = gr.Series(model2, translator, inputs=gr.Textbox(lines=5, label="Input Text"), description=description1)
14
 
15
  demo = gr.TabbedInterface([tg_demo, gt_demo], ["Chinese and English Translator to Text Generator GPT-J-6B", "Chinese Language Generator GPT-2 to Chinese to English Translator"])
16