stefanoviel
commited on
Commit
·
36e5a14
1
Parent(s):
e23e349
changing folder path
Browse files- src/streamlit_app.py +2 -10
src/streamlit_app.py
CHANGED
@@ -13,17 +13,10 @@ EMBEDDING_MODEL = 'sentence-transformers/all-MiniLM-L6-v2'
|
|
13 |
script_dir = Path(__file__).parent
|
14 |
|
15 |
# Define paths relative to the script's directory
|
16 |
-
DATA_FILE =
|
17 |
-
EMBEDDINGS_FILE =
|
18 |
CSV_FILE = 'papers_with_abstracts_parallel.csv'
|
19 |
|
20 |
-
print("script_dir:", script_dir)
|
21 |
-
print("Files in script_dir:")
|
22 |
-
for f in script_dir.iterdir():
|
23 |
-
print(" -", f)
|
24 |
-
print("Files in current directory:")
|
25 |
-
for f in os.listdir('.'):
|
26 |
-
print(" -", f)
|
27 |
|
28 |
|
29 |
# --- Caching Functions ---
|
@@ -78,7 +71,6 @@ def load_data_and_embeddings():
|
|
78 |
|
79 |
# Load the raw data from CSV
|
80 |
try:
|
81 |
-
st.info("current path is: " + str(os.getcwd()))
|
82 |
data_df = pd.read_csv(CSV_FILE)
|
83 |
corpus_embeddings, data_df = create_and_save_embeddings(model, data_df)
|
84 |
except FileNotFoundError:
|
|
|
13 |
script_dir = Path(__file__).parent
|
14 |
|
15 |
# Define paths relative to the script's directory
|
16 |
+
DATA_FILE = './src/papers_data.pkl'
|
17 |
+
EMBEDDINGS_FILE = './src/paper_embeddings.pt'
|
18 |
CSV_FILE = 'papers_with_abstracts_parallel.csv'
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
|
22 |
# --- Caching Functions ---
|
|
|
71 |
|
72 |
# Load the raw data from CSV
|
73 |
try:
|
|
|
74 |
data_df = pd.read_csv(CSV_FILE)
|
75 |
corpus_embeddings, data_df = create_and_save_embeddings(model, data_df)
|
76 |
except FileNotFoundError:
|