jm12138 commited on
Commit
6e553d4
1 Parent(s): 277d86c
Files changed (1) hide show
  1. app.py +3 -77
app.py CHANGED
@@ -22,80 +22,7 @@ title = "ERNIE-Zeus"
22
 
23
  description = "ERNIE-Zeus model, which supports Chinese text generates task."
24
 
25
- css = """
26
- .gradio-container {
27
- font-family: 'IBM Plex Sans', sans-serif;
28
- }
29
- .gr-button {
30
- color: white;
31
- border-color: black;
32
- background: black;
33
- }
34
- input[type='range'] {
35
- accent-color: black;
36
- }
37
- .dark input[type='range'] {
38
- accent-color: #dfdfdf;
39
- }
40
- .container {
41
- max-width: 730px;
42
- margin: auto;
43
- padding-top: 1.5rem;
44
- }
45
- #gallery {
46
- min-height: 22rem;
47
- margin-bottom: 15px;
48
- margin-left: auto;
49
- margin-right: auto;
50
- border-bottom-right-radius: .5rem !important;
51
- border-bottom-left-radius: .5rem !important;
52
- }
53
- #gallery>div>.h-full {
54
- min-height: 20rem;
55
- }
56
- .details:hover {
57
- text-decoration: underline;
58
- }
59
- .gr-button {
60
- white-space: nowrap;
61
- }
62
- .gr-button:focus {
63
- border-color: rgb(147 197 253 / var(--tw-border-opacity));
64
- outline: none;
65
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
66
- --tw-border-opacity: 1;
67
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
68
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
69
- --tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
70
- --tw-ring-opacity: .5;
71
- }
72
- .footer {
73
- margin-bottom: 45px;
74
- margin-top: 35px;
75
- text-align: center;
76
- border-bottom: 1px solid #e5e5e5;
77
- }
78
- .footer>p {
79
- font-size: .8rem;
80
- display: inline-block;
81
- padding: 0 10px;
82
- transform: translateY(10px);
83
- background: white;
84
- }
85
- .dark .footer {
86
- border-color: #303030;
87
- }
88
- .dark .footer>p {
89
- background: #0b0f19;
90
- }
91
- .prompt h4{
92
- margin: 1.25em 0 .25em 0;
93
- font-weight: bold;
94
- font-size: 115%;
95
- }
96
- """
97
-
98
- block = gr.Blocks(css=css)
99
 
100
  examples = [
101
  [
@@ -173,10 +100,9 @@ with block:
173
  with gr.Group():
174
  text = gr.Textbox(
175
  label="input_text",
176
- max_lines=1,
177
- placeholder="Enter your Chinese prompt",
178
  )
179
- btn = gr.Button("Generate text")
180
  task = gr.Dropdown(label="task",
181
  choices=[
182
  'text_summarization',
 
22
 
23
  description = "ERNIE-Zeus model, which supports Chinese text generates task."
24
 
25
+ block = gr.Blocks()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  examples = [
28
  [
 
100
  with gr.Group():
101
  text = gr.Textbox(
102
  label="input_text",
103
+ placeholder="Please enter Chinese text.",
 
104
  )
105
+ btn = gr.Button(value="Generate text")
106
  task = gr.Dropdown(label="task",
107
  choices=[
108
  'text_summarization',