junhyun01 commited on
Commit
18d8c3a
1 Parent(s): 6bd5a8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -29,12 +29,6 @@ def paragraph_leveling(text):
29
  text_list = text.split(".")
30
  result = []
31
 
32
- # output_list.append(('Label: ', None))
33
- # output_list.append(('abnormal', 'abnormal'))
34
- # output_list.append(('normal', 'normal'))
35
- # # output_list.append((' ', 'normal'))
36
- # output_list.append(('not much information', 'not much information'))
37
- # # output_list.append((' ', 'not much information'))
38
  output_list.append(("\n", None))
39
 
40
  for idx_sentence in text_list:
@@ -55,7 +49,7 @@ def paragraph_leveling(text):
55
  output_list.append((idx_sentence, 'normal'))
56
  result.append(1)
57
  else:
58
- output_list.append((idx_sentence, 'not much information'))
59
  result.append(2)
60
 
61
  output_list.append(('\n', None))
@@ -84,7 +78,7 @@ demo = gr.Interface(
84
  label="labeling",
85
  show_legend = True,
86
  show_label = True,
87
- color_map={"abnormal": "violet", "normal": "lightgreen", "not much information": "lightgray"}),
88
  theme=gr.themes.Base()
89
  )
90
  if __name__ == "__main__":
 
29
  text_list = text.split(".")
30
  result = []
31
 
 
 
 
 
 
 
32
  output_list.append(("\n", None))
33
 
34
  for idx_sentence in text_list:
 
49
  output_list.append((idx_sentence, 'normal'))
50
  result.append(1)
51
  else:
52
+ output_list.append((idx_sentence, 'uncertain'))
53
  result.append(2)
54
 
55
  output_list.append(('\n', None))
 
78
  label="labeling",
79
  show_legend = True,
80
  show_label = True,
81
+ color_map={"abnormal": "violet", "normal": "lightgreen", "uncertain": "lightgray"}),
82
  theme=gr.themes.Base()
83
  )
84
  if __name__ == "__main__":