Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -262,10 +262,7 @@ if query:
|
|
262 |
|
263 |
|
264 |
|
265 |
-
|
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',
|
@@ -274,6 +271,11 @@ if query:
|
|
274 |
# Set layer property of scatter trace with diamond to 'above'
|
275 |
fig.update_traces(mode='markers', marker=dict(layer='above'), selector=dict(type='scatter', symbol='diamond'))
|
276 |
|
|
|
|
|
|
|
|
|
|
|
277 |
fig.update(layout_coloraxis_showscale=True)
|
278 |
fig.update_layout(autosize=True, paper_bgcolor="#CCFFFF", margin=dict(t=0, b=0, l=0, r=0))
|
279 |
fig.update_annotations(visible=False)
|
|
|
262 |
|
263 |
|
264 |
|
265 |
+
|
|
|
|
|
|
|
266 |
|
267 |
# Represent query as a large red diamond
|
268 |
fig.add_trace(go.Scatter(x=[model.wv[query][0]], y=[model.wv[query][1]], mode='markers',
|
|
|
271 |
# Set layer property of scatter trace with diamond to 'above'
|
272 |
fig.update_traces(mode='markers', marker=dict(layer='above'), selector=dict(type='scatter', symbol='diamond'))
|
273 |
|
274 |
+
# Add label for the query above the diamond
|
275 |
+
fig.add_trace(go.Scatter(x=[model.wv[query][0]], y=[model.wv[query][1]], mode='text', text=[query],
|
276 |
+
textposition='top right', textfont=dict(color='blue', size=10), hoverinfo='none',
|
277 |
+
showlegend=False))
|
278 |
+
|
279 |
fig.update(layout_coloraxis_showscale=True)
|
280 |
fig.update_layout(autosize=True, paper_bgcolor="#CCFFFF", margin=dict(t=0, b=0, l=0, r=0))
|
281 |
fig.update_annotations(visible=False)
|