Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
138f923
1
Parent(s):
d56bf2d
Update imports, disable caching in datasets library
Browse files
app.py
CHANGED
@@ -9,10 +9,9 @@ from pathlib import Path
|
|
9 |
from sys import stderr
|
10 |
from typing import TypedDict, Self, Any, Callable
|
11 |
|
12 |
-
from datasets import Dataset
|
13 |
from datasets.search import FaissIndex
|
14 |
import faiss
|
15 |
-
from faiss.contrib.ondisk import merge_ondisk
|
16 |
import gradio as gr
|
17 |
import requests
|
18 |
from sentence_transformers import SentenceTransformer
|
@@ -240,6 +239,8 @@ def main():
|
|
240 |
k = get_env_var("K", int, default=20) # TODO: can't go higher than 20 yet
|
241 |
mailto = get_env_var("MAILTO", str, None)
|
242 |
|
|
|
|
|
243 |
normalize, model = get_model(model_name, dir, trust_remote_code)
|
244 |
index = get_index(dir, search_time_s)
|
245 |
|
|
|
9 |
from sys import stderr
|
10 |
from typing import TypedDict, Self, Any, Callable
|
11 |
|
12 |
+
from datasets import Dataset, disable_caching
|
13 |
from datasets.search import FaissIndex
|
14 |
import faiss
|
|
|
15 |
import gradio as gr
|
16 |
import requests
|
17 |
from sentence_transformers import SentenceTransformer
|
|
|
239 |
k = get_env_var("K", int, default=20) # TODO: can't go higher than 20 yet
|
240 |
mailto = get_env_var("MAILTO", str, None)
|
241 |
|
242 |
+
disable_caching() # disable caching in the datasets library
|
243 |
+
|
244 |
normalize, model = get_model(model_name, dir, trust_remote_code)
|
245 |
index = get_index(dir, search_time_s)
|
246 |
|