Spaces:
Runtime error
Runtime error
Juan Martínez
commited on
Commit
·
0b8fc5d
1
Parent(s):
37958d9
fix cache
Browse files
app.py
CHANGED
@@ -10,13 +10,13 @@ def search(text, model, ds, n):
|
|
10 |
contents = retrieved_examples["content"]
|
11 |
return list(zip(matching_titles, [c[:150] for c in contents], urls, scores))
|
12 |
|
13 |
-
@st.
|
14 |
def get_dataset():
|
15 |
ds = load_dataset("justinian336/salvadoran-news-embedded")
|
16 |
embedded_ds.add_faiss_index(column="embedding")
|
17 |
return ds
|
18 |
|
19 |
-
@st.
|
20 |
def get_model():
|
21 |
model = SentenceTransformer("justinian336/chupeto")
|
22 |
return model
|
|
|
10 |
contents = retrieved_examples["content"]
|
11 |
return list(zip(matching_titles, [c[:150] for c in contents], urls, scores))
|
12 |
|
13 |
+
@st.cache()
|
14 |
def get_dataset():
|
15 |
ds = load_dataset("justinian336/salvadoran-news-embedded")
|
16 |
embedded_ds.add_faiss_index(column="embedding")
|
17 |
return ds
|
18 |
|
19 |
+
@st.cache()
|
20 |
def get_model():
|
21 |
model = SentenceTransformer("justinian336/chupeto")
|
22 |
return model
|