Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -260,15 +260,18 @@ if query:
|
|
260 |
marker=dict(size=2, color=sims_query_top, colorscale='RdYlGn', symbol='circle'),
|
261 |
text=words, customdata=sims, name=''))
|
262 |
|
263 |
-
|
264 |
-
fig.add_trace(go.Scatter(x=[model.wv[query][0]], y=[model.wv[query][1]], mode='markers',
|
265 |
-
marker=dict(size=12, color='black', symbol='diamond'), name=query, hovertext=query,
|
266 |
-
showlegend=False, layer='above traces'))
|
267 |
|
268 |
# Add label for the query above the diamond
|
269 |
fig.add_trace(go.Scatter(x=[model.wv[query][0]], y=[model.wv[query][1]], mode='text', text=[query],
|
270 |
textposition='top right', textfont=dict(color='blue', size=10), hoverinfo='none',
|
271 |
-
showlegend=False
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
fig.update(layout_coloraxis_showscale=True)
|
274 |
fig.update_layout(autosize=True, paper_bgcolor="#CCFFFF", margin=dict(t=0, b=0, l=0, r=0))
|
|
|
260 |
marker=dict(size=2, color=sims_query_top, colorscale='RdYlGn', symbol='circle'),
|
261 |
text=words, customdata=sims, name=''))
|
262 |
|
263 |
+
|
|
|
|
|
|
|
264 |
|
265 |
# Add label for the query above the diamond
|
266 |
fig.add_trace(go.Scatter(x=[model.wv[query][0]], y=[model.wv[query][1]], mode='text', text=[query],
|
267 |
textposition='top right', textfont=dict(color='blue', size=10), hoverinfo='none',
|
268 |
+
showlegend=False))
|
269 |
+
|
270 |
+
# Represent query as a large red diamond
|
271 |
+
fig.add_trace(go.Scatter(x=[model.wv[query][0]], y=[model.wv[query][1]], mode='markers',
|
272 |
+
marker=dict(size=12, color='black', symbol='diamond'), name=query, hovertext=query,
|
273 |
+
showlegend=False, layer='above traces'))
|
274 |
+
|
275 |
|
276 |
fig.update(layout_coloraxis_showscale=True)
|
277 |
fig.update_layout(autosize=True, paper_bgcolor="#CCFFFF", margin=dict(t=0, b=0, l=0, r=0))
|