aliabd commited on
Commit
9356cbd
1 Parent(s): 1fee2da

full working demo

Browse files
Files changed (2) hide show
  1. app.py +15 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio.mix import Parallel, Series
3
+
4
+ io1 = gr.Interface.load("huggingface/EleutherAI/gpt-neo-1.3B")
5
+ io2 = gr.Interface.load("huggingface/facebook/m2m100_418M")
6
+
7
+ title = "GPT-Neo and M2M Series Demo"
8
+ description = "Comparing GPT-Neo and M2M using Gradio Series for text generation and translation. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
9
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2010.11125'>Beyond English-Centric Multilingual Machine Translation</a> | <a href='http://github.com/eleutherai/gpt-neo'>GPT-Neo: Large Scale Autoregressive Language Modeling with Mesh-Tensorflow</a></p>"
10
+ examples = [
11
+ ['The tower is 324 metres (1,063 ft) tall,'],
12
+ ["The Moon's orbit around Earth has"],
13
+ ["The smooth Borealis basin in the Northern Hemisphere covers 40%"]
14
+ ]
15
+ Series(io1,io2, inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples).launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
1
+ gradio
2
+ torch