m7n commited on
Commit
05560e1
·
verified ·
1 Parent(s): 7d11a7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -59,14 +59,26 @@ def predict(text_input):
59
  )
60
  arxivml_label_layers.append(np.load(io.BytesIO(label_file.content), allow_pickle=True))
61
 
 
 
 
 
 
 
 
 
62
  plot = datamapplot.create_interactive_plot(
63
  arxivml_data_map,
64
- arxivml_label_layers[2],)
65
-
66
- plot.save(file_path)
67
-
 
 
68
 
69
 
 
 
70
 
71
 
72
 
 
59
  )
60
  arxivml_label_layers.append(np.load(io.BytesIO(label_file.content), allow_pickle=True))
61
 
62
+
63
+
64
+ hover_data_file = requests.get(
65
+ f"{base_url}/raw/interactive/examples/arxiv_ml_hover_data.npy"
66
+ )
67
+ arxiv_hover_data = np.load(io.BytesIO(hover_data_file.content), allow_pickle=True)
68
+
69
+
70
  plot = datamapplot.create_interactive_plot(
71
  arxivml_data_map,
72
+ arxivml_label_layers[0],
73
+ arxivml_label_layers[2],
74
+ arxivml_label_layers[4],
75
+ hover_text = arxiv_hover_data,
76
+ font_family="Roboto Condensed",
77
+ )
78
 
79
 
80
+
81
+ plot.save(file_path)
82
 
83
 
84