Spaces:
Sleeping
Sleeping
Michela
commited on
Commit
·
52d525a
1
Parent(s):
51f1474
debugging path issues
Browse files
app.py
CHANGED
@@ -7,6 +7,18 @@ import os
|
|
7 |
# Get script's directory
|
8 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# Import results
|
11 |
results_clean = pd.read_csv(os.path.join(script_dir, "data/retrieval_results/sonnini_cleaned/i_onit-sonnini-DHd2025-clean-q_Pferd, Pferde.csv")).head(100)
|
12 |
results_prep = pd.read_csv(os.path.join(script_dir, "data/retrieval_results/sonnini_llm_corrected/i_onit-sonnini-DHd2025-prep-q_Pferd, Pferde.csv")).head(100)
|
|
|
7 |
# Get script's directory
|
8 |
script_dir = os.path.dirname(os.path.abspath(__file__))
|
9 |
|
10 |
+
### Debugging ###
|
11 |
+
# Construct the full path to the CSV file
|
12 |
+
file_path = os.path.join(script_dir, "data/retrieval_results/sonnini_original_ocr/i_onit-test-index-sonnini-q_Pferd-Pferde.csv")
|
13 |
+
|
14 |
+
# Debugging: Print and check if the file exists
|
15 |
+
print(f"Resolved file path: {file_path}")
|
16 |
+
print(f"File exists? {os.path.exists(file_path)}")
|
17 |
+
|
18 |
+
if not os.path.exists(file_path):
|
19 |
+
raise FileNotFoundError(f"File not found at: {file_path}")
|
20 |
+
####
|
21 |
+
|
22 |
# Import results
|
23 |
results_clean = pd.read_csv(os.path.join(script_dir, "data/retrieval_results/sonnini_cleaned/i_onit-sonnini-DHd2025-clean-q_Pferd, Pferde.csv")).head(100)
|
24 |
results_prep = pd.read_csv(os.path.join(script_dir, "data/retrieval_results/sonnini_llm_corrected/i_onit-sonnini-DHd2025-prep-q_Pferd, Pferde.csv")).head(100)
|