Spaces:
Sleeping
Sleeping
louisbrulenaudet
commited on
Commit
•
763d5d0
1
Parent(s):
ca4336e
Update app.py
Browse files
app.py
CHANGED
@@ -167,28 +167,6 @@ else:
|
|
167 |
embedding_function=sentence_transformer_ef
|
168 |
)
|
169 |
|
170 |
-
dataframe: pl.DataFrame = pl.scan_parquet(
|
171 |
-
"hf://datasets/louisbrulenaudet/lemone-docs-embeded/data/train-00000-of-00001.parquet"
|
172 |
-
).filter(
|
173 |
-
pl.col(
|
174 |
-
"text"
|
175 |
-
).is_not_null()
|
176 |
-
).collect()
|
177 |
-
|
178 |
-
collection.add(
|
179 |
-
embeddings=dataframe["lemone_pro_embeddings"].to_list(),
|
180 |
-
documents=dataframe["text"].to_list(),
|
181 |
-
metadatas=dataframe.drop(
|
182 |
-
[
|
183 |
-
"lemone_pro_embeddings",
|
184 |
-
"text"
|
185 |
-
]
|
186 |
-
).to_dicts(),
|
187 |
-
ids=[
|
188 |
-
str(i) for i in range(0, dataframe.shape[0])
|
189 |
-
]
|
190 |
-
)
|
191 |
-
|
192 |
|
193 |
def trim_input_ids(
|
194 |
input_ids,
|
|
|
167 |
embedding_function=sentence_transformer_ef
|
168 |
)
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
def trim_input_ids(
|
172 |
input_ids,
|