Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
•
689b5eb
1
Parent(s):
fdb2623
Update
Browse files
app.py
CHANGED
@@ -136,11 +136,10 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
|
136 |
# from langchain.embeddings import HuggingFaceEmbeddings
|
137 |
# embeddings = HuggingFaceEmbeddings(model_name='paraphrase-multilingual-MiniLM-L12-v2')
|
138 |
# https://www.sbert.net/docs/pretrained_models.html
|
139 |
-
#
|
140 |
|
141 |
# 'max_seq_length': 128
|
142 |
MODEL_NAME = "paraphrase-multilingual-mpnet-base-v2" # 1.11G
|
143 |
-
MODEL_NAME = "paraphrase-multilingual-MiniLM-L12-v2" # 471M
|
144 |
|
145 |
# opanai max 4097
|
146 |
# retriever default k = 4, query lenght about CHUNK_SIZE
|
@@ -424,8 +423,8 @@ def process_files(
|
|
424 |
_ = (
|
425 |
f"done file(s): {dict(ns.files_info)}, split to "
|
426 |
f"{total} chunk(s). \n\nThe following embedding takes "
|
427 |
-
f"
|
428 |
-
"
|
429 |
)
|
430 |
|
431 |
return _
|
|
|
136 |
# from langchain.embeddings import HuggingFaceEmbeddings
|
137 |
# embeddings = HuggingFaceEmbeddings(model_name='paraphrase-multilingual-MiniLM-L12-v2')
|
138 |
# https://www.sbert.net/docs/pretrained_models.html
|
|
|
139 |
|
140 |
# 'max_seq_length': 128
|
141 |
MODEL_NAME = "paraphrase-multilingual-mpnet-base-v2" # 1.11G
|
142 |
+
MODEL_NAME = "paraphrase-multilingual-MiniLM-L12-v2" # 471M
|
143 |
|
144 |
# opanai max 4097
|
145 |
# retriever default k = 4, query lenght about CHUNK_SIZE
|
|
|
423 |
_ = (
|
424 |
f"done file(s): {dict(ns.files_info)}, split to "
|
425 |
f"{total} chunk(s). \n\nThe following embedding takes "
|
426 |
+
f"{total} step(s) and approximately {total/10:.1f} minutes. (Each step lasts about ~6 secs "
|
427 |
+
"on a free tier instance on huggingface space.)"
|
428 |
)
|
429 |
|
430 |
return _
|