Jonas Leeb
commited on
Commit
·
66113e1
1
Parent(s):
dc760b4
usability improvements
Browse files
app.py
CHANGED
|
@@ -165,7 +165,15 @@ class ArxivSearch:
|
|
| 165 |
),
|
| 166 |
paper_bgcolor='black', # Outside the plotting area
|
| 167 |
plot_bgcolor='black', # Plotting area
|
| 168 |
-
font=dict(color='white') # Axis and legend text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
)
|
| 170 |
if len(reduced_results_points) > 0:
|
| 171 |
results_trace = go.Scatter3d(
|
|
@@ -175,7 +183,7 @@ class ArxivSearch:
|
|
| 175 |
mode='markers',
|
| 176 |
marker=dict(size=3.5, color='orange', opacity=0.75),
|
| 177 |
name='Results',
|
| 178 |
-
text=[f"<br>
|
| 179 |
hoverinfo='text'
|
| 180 |
)
|
| 181 |
if not self.embedding == "tfidf" and self.query_encoding is not None and self.query_encoding.shape[0] > 0:
|
|
|
|
| 165 |
),
|
| 166 |
paper_bgcolor='black', # Outside the plotting area
|
| 167 |
plot_bgcolor='black', # Plotting area
|
| 168 |
+
font=dict(color='white'), # Axis and legend text
|
| 169 |
+
legend=dict(
|
| 170 |
+
bgcolor='rgba(0,0,0,0)', # Transparent legend background
|
| 171 |
+
bordercolor='rgba(0,0,0,0)', # No border
|
| 172 |
+
x=0.01, # Place legend inside plot area (adjust as needed)
|
| 173 |
+
y=0.99,
|
| 174 |
+
xanchor='left',
|
| 175 |
+
yanchor='top'
|
| 176 |
+
)
|
| 177 |
)
|
| 178 |
if len(reduced_results_points) > 0:
|
| 179 |
results_trace = go.Scatter3d(
|
|
|
|
| 183 |
mode='markers',
|
| 184 |
marker=dict(size=3.5, color='orange', opacity=0.75),
|
| 185 |
name='Results',
|
| 186 |
+
text=[f"<br>{self.documents[i][:100]}" for i in results_indices],
|
| 187 |
hoverinfo='text'
|
| 188 |
)
|
| 189 |
if not self.embedding == "tfidf" and self.query_encoding is not None and self.query_encoding.shape[0] > 0:
|