Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from gradio.mix import Series
|
3 |
|
4 |
-
description = "Input Chinese 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")
|
@@ -10,7 +10,7 @@ model2 = gr.Interface.load("huggingface/ckiplab/gpt2-base-chinese")
|
|
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 Translator to
|
14 |
|
15 |
if __name__ == "__main__":
|
16 |
demo.launch()
|
|
|
1 |
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")
|
|
|
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 |
|
15 |
if __name__ == "__main__":
|
16 |
demo.launch()
|