jithenderchoudary commited on
Commit
9c8fd6c
·
verified ·
1 Parent(s): b9170e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -3,6 +3,23 @@ import pdfplumber
3
  import pandas as pd
4
  import openpyxl # Explicitly import openpyxl for Excel support
5
  import os
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  directory_path = "/mnt/data/"
8
 
 
3
  import pandas as pd
4
  import openpyxl # Explicitly import openpyxl for Excel support
5
  import os
6
+ import pandas as pd
7
+
8
+ # Define the path
9
+ input_file_path = '/mnt/data/extracted_data (1).xlsx'
10
+
11
+ # Check if the directory exists and create it if it doesn't
12
+ if not os.path.exists('/mnt/data/'):
13
+ os.makedirs('/mnt/data/')
14
+
15
+ # Check if the file exists
16
+ if os.path.exists(input_file_path):
17
+ # Read the Excel file if it exists
18
+ df = pd.read_excel(input_file_path)
19
+ print("File loaded successfully.")
20
+ else:
21
+ print(f"File not found: {input_file_path}. Please ensure the file is in the directory.")
22
+
23
 
24
  directory_path = "/mnt/data/"
25