Spaces:
Build error
Build error
fix: Fix indexing for topic-color mapping
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ def draw_interactive_scatter_plot(
|
|
58 |
if n_colors not in Pallete:
|
59 |
Palette = AuxPallete
|
60 |
p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
|
61 |
-
colors = factor_cmap("label", palette=[Pallete[n_colors][int(id_)] for id_ in values_color_set], factors=values_set)
|
62 |
p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
|
63 |
p.axis.visible = False
|
64 |
p.xgrid.grid_line_dash = "dashed"
|
|
|
58 |
if n_colors not in Pallete:
|
59 |
Palette = AuxPallete
|
60 |
p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
|
61 |
+
colors = factor_cmap("label", palette=[Pallete[n_colors][int(id_) + 1] for id_ in values_color_set], factors=values_set)
|
62 |
p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
|
63 |
p.axis.visible = False
|
64 |
p.xgrid.grid_line_dash = "dashed"
|