jingwora commited on
Commit
4d4057a
1 Parent(s): 3cf11be

Add application file

Browse files
Files changed (2) hide show
  1. app.py +28 -0
  2. requirements.txt +3 -0
app.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ from transformers import pipeline
3
+ import gradio as gr
4
+
5
+
6
+ title = "umt5-xl"
7
+ description = """
8
+ Task: Text2Text Generation\n
9
+ Trained dataset: mC4 corpus \n
10
+ Languages: 107 languages \n
11
+ Model: https://huggingface.co/google/umt5-xl
12
+ Developer: Google \n
13
+ Paper: https://openreview.net/forum?id=kXwdL1cWOAi
14
+ """
15
+
16
+ examples=[["I am "], ["私は"], ["我是"], ["ฉันคือ"]]
17
+
18
+ demo =gr.load(
19
+ "huggingface/google/umt5-xl",
20
+ inputs=gr.Textbox(lines=5, label="Input Text"),
21
+ title=title,
22
+ description=description,
23
+ article=article,
24
+ examples=examples,
25
+ theme="freddyaboulton/dracula_revamped",
26
+ )
27
+
28
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio==3.36.1
2
+ transformers==4.30.2
3
+ torch==2.0.1