Spaces:
Sleeping
Sleeping
Update doc_preprocessing.py
Browse files- doc_preprocessing.py +1 -2
doc_preprocessing.py
CHANGED
|
@@ -6,7 +6,6 @@ import streamlit as st
|
|
| 6 |
import numpy as np
|
| 7 |
import os
|
| 8 |
|
| 9 |
-
import builtins
|
| 10 |
|
| 11 |
emb_model = "intfloat/multilingual-e5-base"
|
| 12 |
|
|
@@ -71,7 +70,7 @@ def get_embeddings(texts)-> np.ndarray:
|
|
| 71 |
st.error(f"Error generating embeddings: {e}")
|
| 72 |
return np.array([])
|
| 73 |
|
| 74 |
-
@st.
|
| 75 |
def process_files(files):
|
| 76 |
all_chunks = []
|
| 77 |
all_embeddings = []
|
|
|
|
| 6 |
import numpy as np
|
| 7 |
import os
|
| 8 |
|
|
|
|
| 9 |
|
| 10 |
emb_model = "intfloat/multilingual-e5-base"
|
| 11 |
|
|
|
|
| 70 |
st.error(f"Error generating embeddings: {e}")
|
| 71 |
return np.array([])
|
| 72 |
|
| 73 |
+
@st.cache_data
|
| 74 |
def process_files(files):
|
| 75 |
all_chunks = []
|
| 76 |
all_embeddings = []
|