Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -104,12 +104,10 @@ def generate_charts(ner_output_ext: dict) -> Tuple[go.Figure, np.ndarray]:
|
|
104 |
plot_bgcolor='rgba(0,0,0,0)',
|
105 |
paper_bgcolor='rgba(0,0,0,0)'
|
106 |
)
|
107 |
-
|
108 |
-
|
109 |
# Generate word cloud
|
110 |
-
wordcloud_image = generate_wordcloud(
|
111 |
|
112 |
-
return
|
113 |
|
114 |
def generate_wordcloud(entities: List[Dict], color_map: Dict[str, str], file_path: str) -> np.ndarray:
|
115 |
# Construct the absolute path
|
|
|
104 |
plot_bgcolor='rgba(0,0,0,0)',
|
105 |
paper_bgcolor='rgba(0,0,0,0)'
|
106 |
)
|
|
|
|
|
107 |
# Generate word cloud
|
108 |
+
wordcloud_image = generate_wordcloud(ner_output_bin['entities'], bin_color_map, "dh3.png")
|
109 |
|
110 |
+
return fig2, wordcloud_image
|
111 |
|
112 |
def generate_wordcloud(entities: List[Dict], color_map: Dict[str, str], file_path: str) -> np.ndarray:
|
113 |
# Construct the absolute path
|