Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,11 +38,11 @@ def download_models():
|
|
38 |
subprocess.run(["wget", "--no-check-certificate", "https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/clip-ViT-B-32-multilingual-v1.zip"], check=True)
|
39 |
subprocess.run(["unzip", "-q", "clip-ViT-B-32-multilingual-v1.zip", "-d", model_dir], check=True)
|
40 |
|
41 |
-
|
42 |
|
43 |
@st.cache_data(show_spinner=True)
|
44 |
def load_dataset():
|
45 |
-
dataset = datasets.load_dataset('rjadr/ditaduranuncamais', split='train', use_auth_token=
|
46 |
dataset.add_faiss_index(column="txt_embs")
|
47 |
dataset.add_faiss_index(column="img_embs")
|
48 |
dataset = dataset.remove_columns(['Post Created Date', 'Post Created Time','Like and View Counts Disabled','Link','Download URL','Views'])
|
|
|
38 |
subprocess.run(["wget", "--no-check-certificate", "https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/clip-ViT-B-32-multilingual-v1.zip"], check=True)
|
39 |
subprocess.run(["unzip", "-q", "clip-ViT-B-32-multilingual-v1.zip", "-d", model_dir], check=True)
|
40 |
|
41 |
+
token_ = os.getenv['token'] #st.secrets["token"]
|
42 |
|
43 |
@st.cache_data(show_spinner=True)
|
44 |
def load_dataset():
|
45 |
+
dataset = datasets.load_dataset('rjadr/ditaduranuncamais', split='train', use_auth_token=token_)
|
46 |
dataset.add_faiss_index(column="txt_embs")
|
47 |
dataset.add_faiss_index(column="img_embs")
|
48 |
dataset = dataset.remove_columns(['Post Created Date', 'Post Created Time','Like and View Counts Disabled','Link','Download URL','Views'])
|