Spaces:
Sleeping
Sleeping
Davide Panza
commited on
Update app/main_IO.py
Browse files- app/main_IO.py +3 -1
app/main_IO.py
CHANGED
|
@@ -63,8 +63,10 @@ def reset_session_state_on_upload():
|
|
| 63 |
st.session_state[key] = default_val
|
| 64 |
|
| 65 |
|
| 66 |
-
# Define model path - check multiple possible locations
|
| 67 |
def get_model_path(EMBEDDING_MODEL):
|
|
|
|
|
|
|
|
|
|
| 68 |
# Try local model first (relative to current script)
|
| 69 |
local_model_path = os.path.join(os.path.dirname(__file__), "chromadb_model")
|
| 70 |
|
|
|
|
| 63 |
st.session_state[key] = default_val
|
| 64 |
|
| 65 |
|
|
|
|
| 66 |
def get_model_path(EMBEDDING_MODEL):
|
| 67 |
+
# Define root_path within the function
|
| 68 |
+
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
| 69 |
+
|
| 70 |
# Try local model first (relative to current script)
|
| 71 |
local_model_path = os.path.join(os.path.dirname(__file__), "chromadb_model")
|
| 72 |
|