Spaces:
Sleeping
Sleeping
Increase max rows
Browse files
app.py
CHANGED
@@ -25,11 +25,10 @@ import gradio as gr
|
|
25 |
|
26 |
"""
|
27 |
TODOs:
|
28 |
-
- Try with
|
29 |
-
- Add TextGenerationLayer
|
30 |
-
- Try with more rows
|
31 |
-
- Export and serve an interactive HTML plot?
|
32 |
- Make it run on Zero GPU
|
|
|
|
|
33 |
"""
|
34 |
|
35 |
load_dotenv()
|
@@ -46,8 +45,8 @@ logging.basicConfig(
|
|
46 |
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
47 |
)
|
48 |
|
49 |
-
MAX_ROWS =
|
50 |
-
CHUNK_SIZE =
|
51 |
|
52 |
|
53 |
session = requests.Session()
|
@@ -250,17 +249,18 @@ def generate_topics(dataset, config, split, column, nested_column, plot_type):
|
|
250 |
title=dataset,
|
251 |
width=800,
|
252 |
height=700,
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
264 |
)
|
265 |
if plot_type == "DataMapPlot"
|
266 |
else base_model.visualize_documents(
|
|
|
25 |
|
26 |
"""
|
27 |
TODOs:
|
28 |
+
- Improve representation layer (Try with llamacpp or TextGeneration)
|
|
|
|
|
|
|
29 |
- Make it run on Zero GPU
|
30 |
+
- Try with more rows (Current: 50_000/10_000 -> Minimal Targett: 1_000_000/20_000)
|
31 |
+
- Export interactive plots and serve their HTML content (It doesn't work with gr.HTML)
|
32 |
"""
|
33 |
|
34 |
load_dotenv()
|
|
|
45 |
level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
46 |
)
|
47 |
|
48 |
+
MAX_ROWS = 50_000
|
49 |
+
CHUNK_SIZE = 10_000
|
50 |
|
51 |
|
52 |
session = requests.Session()
|
|
|
249 |
title=dataset,
|
250 |
width=800,
|
251 |
height=700,
|
252 |
+
arrowprops={
|
253 |
+
"arrowstyle": "wedge,tail_width=0.5",
|
254 |
+
"connectionstyle": "arc3,rad=0.05",
|
255 |
+
"linewidth": 0,
|
256 |
+
"fc": "#33333377",
|
257 |
+
},
|
258 |
+
dynamic_label_size=False,
|
259 |
+
# label_wrap_width=12,
|
260 |
+
# label_over_points=True,
|
261 |
+
# dynamic_label_size=True,
|
262 |
+
# max_font_size=36,
|
263 |
+
# min_font_size=4,
|
264 |
)
|
265 |
if plot_type == "DataMapPlot"
|
266 |
else base_model.visualize_documents(
|