Jonas Leeb commited on
Commit
5e54614
·
1 Parent(s): c8a50e8

plotting bug fix 2

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -185,7 +185,7 @@ class ArxivSearch:
185
  marker=dict(size=3.5, color='orange', opacity=0.75),
186
  name='Results'
187
  )
188
- if query_point.shape[0] > 0:
189
  query_trace = go.Scatter3d(
190
  x=query_point[:, 0],
191
  y=query_point[:, 1],
@@ -284,6 +284,9 @@ class ArxivSearch:
284
 
285
 
286
  def search_function(self, query, embedding):
 
 
 
287
  # Load or switch embedding model here if needed
288
  if embedding == "tfidf":
289
  results = self.keyword_match_ranking(query)
 
185
  marker=dict(size=3.5, color='orange', opacity=0.75),
186
  name='Results'
187
  )
188
+ if not "tfidf" and self.query_encoding is not None and self.query_encoding.shape[0] > 0:
189
  query_trace = go.Scatter3d(
190
  x=query_point[:, 0],
191
  y=query_point[:, 1],
 
284
 
285
 
286
  def search_function(self, query, embedding):
287
+ # Preprocess the query
288
+ query = query.strip().lower()
289
+
290
  # Load or switch embedding model here if needed
291
  if embedding == "tfidf":
292
  results = self.keyword_match_ranking(query)