ADKU commited on
Commit
a91f0db
·
verified ·
1 Parent(s): b1ee439

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
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("springer_papers_DL.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):