Spaces:
Sleeping
Sleeping
Update scrape_3gpp.py
Browse files- scrape_3gpp.py +1 -5
scrape_3gpp.py
CHANGED
@@ -71,21 +71,17 @@ import gradio as gr
|
|
71 |
|
72 |
|
73 |
def scrape(url, excel_file, folder_name, status_list, sorted_files, progress=gr.Progress()):
|
74 |
-
|
75 |
-
print("ENTERING SCRAPE FUNCTION")
|
76 |
filenames = []
|
77 |
status_filenames = []
|
78 |
df = pd.DataFrame() # Initialize df to ensure it's always defined
|
79 |
|
80 |
# Try to process the Excel file if provided and valid
|
81 |
-
print(f"WE ARE TESTING IF OS.PATH.EXISTS WITH THIS FILE : {excel_file}")
|
82 |
if excel_file and os.path.exists(excel_file):
|
83 |
try:
|
84 |
df = pd.read_excel(excel_file)
|
85 |
print(f"Initial DataFrame size: {len(df)}")
|
86 |
|
87 |
-
|
88 |
-
print(f"WE ARE TRYING TO LOOK AT df.columns : {df.columns.tolist()}")
|
89 |
if 'TDoc Status' in df.columns and status_list:
|
90 |
df = df[df['TDoc Status'].isin(status_list)]
|
91 |
print(f"Filtered DataFrame size: {len(df)}")
|
|
|
71 |
|
72 |
|
73 |
def scrape(url, excel_file, folder_name, status_list, sorted_files, progress=gr.Progress()):
|
|
|
|
|
74 |
filenames = []
|
75 |
status_filenames = []
|
76 |
df = pd.DataFrame() # Initialize df to ensure it's always defined
|
77 |
|
78 |
# Try to process the Excel file if provided and valid
|
|
|
79 |
if excel_file and os.path.exists(excel_file):
|
80 |
try:
|
81 |
df = pd.read_excel(excel_file)
|
82 |
print(f"Initial DataFrame size: {len(df)}")
|
83 |
|
84 |
+
|
|
|
85 |
if 'TDoc Status' in df.columns and status_list:
|
86 |
df = df[df['TDoc Status'].isin(status_list)]
|
87 |
print(f"Filtered DataFrame size: {len(df)}")
|