Daniel-Saeedi commited on
Commit
6c8f11d
1 Parent(s): b507a08

Downloading models

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def make_slider(unmask):
17
  html = '<div>'
18
 
19
  for word in unmask:
20
- html += '<h3>{}</h3><input type="range" disabled min="0" max="100" value="{}" style="width: 100%;">'.format(word['token_str'],factor*word['score'])
21
 
22
  html += '</div>'
23
  return html
@@ -26,7 +26,7 @@ def make_slider(unmask):
26
 
27
  def fill_mask(stmt,model):
28
  if model == 'bert':
29
- return make_slider(bert_debiased(stmt))
30
 
31
 
32
  demo = gr.Interface(
 
17
  html = '<div>'
18
 
19
  for word in unmask:
20
+ html += '<h5>{}</h5><input type="range" disabled min="0" max="100" value="{}%" style="width: 100%;">'.format(word['token_str'],factor*word['score'])
21
 
22
  html += '</div>'
23
  return html
 
26
 
27
  def fill_mask(stmt,model):
28
  if model == 'bert':
29
+ return "<h2>Debiased:</h2>" + make_slider(bert_debiased(stmt)) + "<h2>Original:</h2>" + make_slider(bert_original(stmt))
30
 
31
 
32
  demo = gr.Interface(