Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,14 @@ os.environ["HUGGINGFACE_HUB_CACHE"] = "/tmp/huggingface"
|
|
13 |
|
14 |
app = FastAPI()
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Load dataset
|
17 |
-
df = pd.read_json(
|
18 |
|
19 |
# Clean text function
|
20 |
def clean_text(text):
|
|
|
13 |
|
14 |
app = FastAPI()
|
15 |
|
16 |
+
# Ensure the correct file path
|
17 |
+
DATASET_PATH = os.path.join(os.getcwd(), "springer_papers_DL.json")
|
18 |
+
|
19 |
+
if not os.path.exists(DATASET_PATH):
|
20 |
+
raise FileNotFoundError(f"Dataset file not found at {DATASET_PATH}")
|
21 |
+
|
22 |
# Load dataset
|
23 |
+
df = pd.read_json(DATASET_PATH)
|
24 |
|
25 |
# Clean text function
|
26 |
def clean_text(text):
|