lorenzoscottb commited on
Commit
933a0c8
·
1 Parent(s): 62fda1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,9 +17,9 @@ def test_input(words):
17
  word_dict = {}
18
  for w in words.split(","):
19
  if w in all_set:
20
- word_dict[w] = 1.
21
  else:
22
- word_dict[w] = 0.
23
  return word_dict
24
 
25
 
@@ -58,7 +58,7 @@ examples_w = [["red,car,vehicle"], ["fake,smile"], ["small,cat,animal"]]
58
  interface_words = gr.Interface(
59
  fn=test_input,
60
  inputs=gr.Textbox(label="Input:word_1,word2,...,word_n"),
61
- outputs=gr.outputs.Label(label="In training-distribution?"),
62
  description=description_w,
63
  examples=examples_w,
64
  )
 
17
  word_dict = {}
18
  for w in words.split(","):
19
  if w in all_set:
20
+ word_dict[w] = "in-distribution"
21
  else:
22
+ word_dict[w] = "out-distribution"
23
  return word_dict
24
 
25
 
 
58
  interface_words = gr.Interface(
59
  fn=test_input,
60
  inputs=gr.Textbox(label="Input:word_1,word2,...,word_n"),
61
+ outputs=gr.Textbox(label="In training-distribution?"),
62
  description=description_w,
63
  examples=examples_w,
64
  )