i have a script which I want to modify. during selection of zip the script only let me select zip from one path but I want all zip files should load along with their respective paths. also add a refresh button for load all zip files from Google drive. here is my script - import os
import requests
from google.colab import drive, auth
import ipywidgets as widgets
from IPython.display import display, clear_output
from pathlib import Path
from ipywidgets import Layout, SelectMultiple  
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseDownload

# Mount Google Drive
drive.mount('/content/drive')

# Define the API token
token = '6260c93ebef0e9f7fd419e1aa78b672b'  

# Function to list all zip files in Google Drive with paths
def list_files_in_drive(folder_id='root', file_extension='.zip'):  
    """List all files with a given extension in Google Drive, including paths."""
    auth.authenticate_user()
    drive_service = build('drive', 'v3')

    files = []
    page_token = None
    while True:
        response = drive_service.files().list(
            q=f"mimeType='application/zip' and trashed=false and '{folder_id}' in parents", 
            spaces='drive',
            fields='nextPageToken, files(id, name, parents)',
            pageToken=page_token
        ).execute()

        for file in response.get('files', []):
            # Get file path by recursively resolving parent folders
            path = file['name']
            parent_id = file.get('parents', [None])[0] 
            while parent_id and parent_id != 'root':
                parent = drive_service.files().get(fileId=parent_id, fields='id, name, parents').execute()
                path = os.path.join(parent['name'], path)
                parent_id = parent.get('parents', [None])[0]
            files.append((path, file['id']))  # Store path and ID as a tuple

        page_token = response.get('nextPageToken', None)
        if page_token is None:
            break

    return files

# Function to upload the file and save the URL, preserving original file name
def upload_file(file_id, file_name):  
    """Upload the file to the API and save the URL, preserving original file name."""
    auth.authenticate_user()
    drive_service = build('drive', 'v3')

    # Download the file from Google Drive to a temporary location
    request = drive_service.files().get_media(fileId=file_id)
    with open(file_name, 'wb') as f:  # Use original file name
        downloader = MediaIoBaseDownload(f, request)
        done = False
        while done is False:
            status, done = downloader.next_chunk()

    try:
        with open(file_name, 'rb') as file_to_upload:  # Use original file name
            files = {'file': (file_name, file_to_upload)}  # Preserve original name
            data = {'token': token}
            response = requests.post('https://api.upfiles.com/upload', files=files, data=data)

        if response.status_code == 200:
            result = response.json()
            if 'status' in result and result['status'] == 'success':
                upload_url = result['url']
                print(f"File uploaded successfully. URL: {upload_url}")

                # Save the URL to a text file with the original file name
                with open(f'{file_name}.txt', 'w') as output_file: 
                    output_file.write(upload_url)
                print(f"Link saved to {file_name}.txt")
            else:
                print(f"Error during upload: {result.get('message', 'Unknown error')}")
        else:
            print(f"Request failed with status code: {response.status_code}")

    except FileNotFoundError:
        print(f"File not found.")

    finally:
        # Clean up the temporary file (if it exists)
        if os.path.exists(file_name):
            os.remove(file_name)


# Create interface for file selection and upload (modified for multiple selection)
def on_button_click(b):
    clear_output(wait=True)
    display(file_selector, upload_button)
    selected_files = file_selector.value  # Get selected files (list of tuples)
    all_urls = []  # Store all URLs

    for file_path, file_id in selected_files:
        print(f"Selected file: {file_path} (ID: {file_id})")
        file_name = os.path.basename(file_path)  # Get original file name
        upload_file(file_id, file_name)  # Pass file name
        
        # Append the URL to the list
        with open(f'{file_name}.txt', 'r') as url_file:
            all_urls.append(url_file.read())

    # Save all URLs to a single text file
    with open('all_uploaded_links.txt', 'w') as output_file:
        output_file.write('\n'.join(all_urls))
    print(f"All uploaded links saved to all_uploaded_links.txt")


# Get the list of zip files with paths
file_options = list_files_in_drive()
file_options_display = [f"{path} ({file_id})" for path, file_id in file_options]

# Create the SelectMultiple widget
file_selector = SelectMultiple(
    options=file_options_display,
    description='Select Files:',
    layout=Layout(width='50%'),
    rows=10 # Adjust the number of rows as needed
)

upload_button = widgets.Button(
    description='Upload Files',
    button_style='primary'
)

upload_button.on_click(on_button_click)

# Display the interface
display(widgets.VBox([file_selector, upload_button]))