asoria HF staff commited on
Commit
18889e4
1 Parent(s): 9c726b4

Change by RAPIDS instead

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -6,8 +6,10 @@ from torch import cuda
6
  from gradio_huggingfacehub_search import HuggingfaceHubSearch
7
  from bertopic import BERTopic
8
  from bertopic.representation import KeyBERTInspired
9
- from umap import UMAP
10
- from hdbscan import HDBSCAN
 
 
11
  from sklearn.feature_extraction.text import CountVectorizer
12
 
13
  from sentence_transformers import SentenceTransformer
@@ -32,8 +34,8 @@ logging.basicConfig(
32
  level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
33
  )
34
 
35
- MAX_ROWS = 5_000
36
- CHUNK_SIZE = 1_000
37
 
38
 
39
  session = requests.Session()
 
6
  from gradio_huggingfacehub_search import HuggingfaceHubSearch
7
  from bertopic import BERTopic
8
  from bertopic.representation import KeyBERTInspired
9
+
10
+ from cuml.manifold import UMAP
11
+ from cuml.cluster import HDBSCAN
12
+
13
  from sklearn.feature_extraction.text import CountVectorizer
14
 
15
  from sentence_transformers import SentenceTransformer
 
34
  level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
35
  )
36
 
37
+ MAX_ROWS = 10_000
38
+ CHUNK_SIZE = 2_000
39
 
40
 
41
  session = requests.Session()