Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +2 -2
src/streamlit_app.py
CHANGED
|
@@ -78,8 +78,8 @@ text_field = "text" if "text" in data.features else list(data.features.keys())[0
|
|
| 78 |
|
| 79 |
# ========== 🧠 Embedding Function ==========
|
| 80 |
@st.cache_data(show_spinner=False)
|
| 81 |
-
def embed_texts(
|
| 82 |
-
return text_model.encode(
|
| 83 |
|
| 84 |
# Pick which text column to use
|
| 85 |
TEXT_COLUMN = "complaints" # or "general_complaint", depending on your needs
|
|
|
|
| 78 |
|
| 79 |
# ========== 🧠 Embedding Function ==========
|
| 80 |
@st.cache_data(show_spinner=False)
|
| 81 |
+
def embed_texts(_texts):
|
| 82 |
+
return text_model.encode(_texts, convert_to_tensor=True)
|
| 83 |
|
| 84 |
# Pick which text column to use
|
| 85 |
TEXT_COLUMN = "complaints" # or "general_complaint", depending on your needs
|