Team Ai
Apppublic

alphanet06/processor

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
authenticate_gdrive.py29 linesDownload Raw Back to root
1#!/usr/bin/env python32"""3Simple Google Drive authentication to generate credentials.json4"""5 6from pydrive2.auth import GoogleAuth7 8print("๐Ÿ” Authenticating with Google Drive...")9print()10 11# Initialize GoogleAuth12gauth = GoogleAuth(settings_file='settings.yaml')13 14# Authenticate (will open browser)15print("๐ŸŒ Opening browser for authentication...")16gauth.LocalWebserverAuth()17 18# Save credentials using PyDrive2's method19gauth.SaveCredentialsFile("credentials.json")20 21print()22print("โœ… Success! credentials.json has been created.")23print()24print("๐Ÿ“ค Upload these files to your HuggingFace space:")25print("   - credentials.json")26print("   - settings.yaml")27print("   - client_secrets.json")28 29