Jonas Leeb
commited on
Commit
·
ca1f4b1
1
Parent(s):
5355a96
fixed bug when plotting tfidf
Browse files
app.py
CHANGED
@@ -175,15 +175,18 @@ class ArxivSearch:
|
|
175 |
marker=dict(size=3.5, color='orange', opacity=0.75),
|
176 |
name='Results'
|
177 |
)
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
187 |
else:
|
188 |
fig = go.Figure(data=[trace], layout=layout)
|
189 |
return fig
|
|
|
175 |
marker=dict(size=3.5, color='orange', opacity=0.75),
|
176 |
name='Results'
|
177 |
)
|
178 |
+
if self.query_encoding is not None and self.query_encoding.shape[0] > 0:
|
179 |
+
query_trace = go.Scatter3d(
|
180 |
+
x=query_point[:, 0],
|
181 |
+
y=query_point[:, 1],
|
182 |
+
z=query_point[:, 2],
|
183 |
+
mode='markers',
|
184 |
+
marker=dict(size=5, color='red', opacity=0.8),
|
185 |
+
name='Query'
|
186 |
+
)
|
187 |
+
fig = go.Figure(data=[trace, results_trace, query_trace], layout=layout)
|
188 |
+
else:
|
189 |
+
fig = go.Figure(data=[trace, results_trace], layout=layout)
|
190 |
else:
|
191 |
fig = go.Figure(data=[trace], layout=layout)
|
192 |
return fig
|