team-optima commited on
Commit
093908e
·
verified ·
1 Parent(s): 17bc9d2

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -97,7 +97,7 @@ def create_predictions_html(predictions):
97
  cursor: pointer;
98
  transition: all 0.2s ease;
99
  border: 2px solid transparent;
100
- margin: 6px 0;
101
  " onmouseover="this.style.background='#DAE5FC'; this.style.transform='translateX(3px)';"
102
  onmouseout="this.style.background='#EAF0FD'; this.style.transform='translateX(0)';"
103
  onclick="{onclick_code}">
@@ -105,14 +105,14 @@ def create_predictions_html(predictions):
105
  <span style="
106
  font-weight: 800;
107
  color: #2c3e50;
108
- font-size: 15px;
109
  font-family: system-ui, -apple-system, sans-serif;
110
  ">{pred['display_word']}</span>
111
  </div>
112
  <span style="
113
  color: #6591F4;
114
  font-weight: 600;
115
- font-size: 14px;
116
  ">{pred['probability']:.1f}%</span>
117
  </div>
118
  '''
@@ -175,7 +175,6 @@ h3, .markdown h3 {
175
  color: #333 !important;
176
  font-size: 18px !important;
177
  margin-top: 0px !important;
178
- margin-bottom: 8px !important;
179
  padding-left: 40px !important;
180
  padding-right: 40px !important;
181
  padding-top: 0px !important;
@@ -233,8 +232,8 @@ textarea {
233
  box-shadow: none !important;
234
  outline: none !important;
235
  overflow-y: scroll !important;
236
- margin-top: 48px !important;
237
- margin-bottom: 48px !important;
238
  }
239
 
240
  textarea:focus {
@@ -287,7 +286,7 @@ textarea::placeholder {
287
  with gr.Blocks(css=custom_css, title="Next Word Prediction") as demo:
288
  gr.Markdown("""<center>
289
  <h1>Next Word Prediction</h1>
290
- <p>Based on GBT2</p>
291
  </center>""")
292
 
293
  with gr.Row():
 
97
  cursor: pointer;
98
  transition: all 0.2s ease;
99
  border: 2px solid transparent;
100
+ margin: 8px 0;
101
  " onmouseover="this.style.background='#DAE5FC'; this.style.transform='translateX(3px)';"
102
  onmouseout="this.style.background='#EAF0FD'; this.style.transform='translateX(0)';"
103
  onclick="{onclick_code}">
 
105
  <span style="
106
  font-weight: 800;
107
  color: #2c3e50;
108
+ font-size: 18px;
109
  font-family: system-ui, -apple-system, sans-serif;
110
  ">{pred['display_word']}</span>
111
  </div>
112
  <span style="
113
  color: #6591F4;
114
  font-weight: 600;
115
+ font-size: 18px;
116
  ">{pred['probability']:.1f}%</span>
117
  </div>
118
  '''
 
175
  color: #333 !important;
176
  font-size: 18px !important;
177
  margin-top: 0px !important;
 
178
  padding-left: 40px !important;
179
  padding-right: 40px !important;
180
  padding-top: 0px !important;
 
232
  box-shadow: none !important;
233
  outline: none !important;
234
  overflow-y: scroll !important;
235
+ margin-top: 40px !important;
236
+ margin-bottom: 40px !important;
237
  }
238
 
239
  textarea:focus {
 
286
  with gr.Blocks(css=custom_css, title="Next Word Prediction") as demo:
287
  gr.Markdown("""<center>
288
  <h1>Next Word Prediction</h1>
289
+ <p>Based on GPT-2</p>
290
  </center>""")
291
 
292
  with gr.Row():