Spaces:
Sleeping
Sleeping
Update scrape_3gpp.py
Browse files- scrape_3gpp.py +3 -1
scrape_3gpp.py
CHANGED
@@ -428,7 +428,9 @@ def extractionPrincipale(url, excel_file=None, status_list=None, progress=gr.Pro
|
|
428 |
|
429 |
# After processing all files and directories
|
430 |
# Read the guide.xlsx file into a DataFrame to map 'TDoc' to 'Source'
|
431 |
-
|
|
|
|
|
432 |
tdoc_source_map = {row['TDoc']: row['Source'] for index, row in guide_df.iterrows()}
|
433 |
tdoc_status_map = {row['TDoc']: row['TDoc Status'] for index, row in guide_df.iterrows()}
|
434 |
# Update the 'Source' in your data based on matching 'Nom du fichier' with 'TDoc'
|
|
|
428 |
|
429 |
# After processing all files and directories
|
430 |
# Read the guide.xlsx file into a DataFrame to map 'TDoc' to 'Source'
|
431 |
+
guide_file = 'guide.xlsx'
|
432 |
+
if os.path.exists(guide_file):
|
433 |
+
guide_df = pd.read_excel(guide_file, usecols=['Source', 'TDoc', 'TDoc Status'])
|
434 |
tdoc_source_map = {row['TDoc']: row['Source'] for index, row in guide_df.iterrows()}
|
435 |
tdoc_status_map = {row['TDoc']: row['TDoc Status'] for index, row in guide_df.iterrows()}
|
436 |
# Update the 'Source' in your data based on matching 'Nom du fichier' with 'TDoc'
|