Spaces:
Sleeping
Sleeping
Download backend/db.py from notebooklm-group2/NotebookLM-Clone: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/spaces/notebooklm-group2/NotebookLM-Clone/resolve/main/backend/db.py
- Command line
-
hf download hf://spaces/notebooklm-group2/NotebookLM-Clone/backend/db.py
-
curl -L -o db.py https://huggingface.co/spaces/notebooklm-group2/NotebookLM-Clone/resolve/main/backend/db.py
469 Bytes
| """Shared Supabase client.""" | |
| import os | |
| from pathlib import Path | |
| from dotenv import load_dotenv | |
| from supabase import create_client, Client | |
| load_dotenv(Path(__file__).resolve().parent.parent.parent / ".env") | |
| load_dotenv(Path(__file__).resolve().parent.parent / ".env") | |
| url = os.getenv("SUPABASE_URL") | |
| key = os.getenv("SUPABASE_KEY") | |
| if not url or not key: | |
| raise ValueError("SUPABASE_URL and SUPABASE_KEY must be set") | |
| supabase: Client = create_client(url, key) | |