AlGe commited on
Commit
745604f
·
verified ·
1 Parent(s): b160d87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -74,7 +74,7 @@ def process_ner(text: str, pipeline) -> dict:
74
 
75
  return {"text": text, "entities": entities}
76
 
77
- def generate_charts(ner_output_bin: dict, ner_output_ext: dict) -> Tuple[go.Figure, go.Figure, np.ndarray]:
78
  entities_ext = [entity['entity'] for entity in ner_output_ext['entities']]
79
 
80
  # Counting entities for extended classification
@@ -149,7 +149,7 @@ def generate_wordcloud(entities: List[Dict], color_map: Dict[str, str]) -> np.nd
149
  def all(text: str):
150
  ner_output_ext = process_ner(text, pipe_ext)
151
 
152
- pie_chart, wordcloud_image = generate_charts(ner_output_bin, ner_output_ext)
153
 
154
  return (ner_output_ext, pie_chart, wordcloud_image)
155
 
 
74
 
75
  return {"text": text, "entities": entities}
76
 
77
+ def generate_charts(ner_output_ext: dict) -> Tuple[go.Figure, np.ndarray]:
78
  entities_ext = [entity['entity'] for entity in ner_output_ext['entities']]
79
 
80
  # Counting entities for extended classification
 
149
  def all(text: str):
150
  ner_output_ext = process_ner(text, pipe_ext)
151
 
152
+ pie_chart, wordcloud_image = generate_charts(ner_output_ext)
153
 
154
  return (ner_output_ext, pie_chart, wordcloud_image)
155