NotebookLM clone: Gradio app, backend, Gemini artifacts
Browse files- DEPLOY_TO_HF_SPACE.md +14 -14
DEPLOY_TO_HF_SPACE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Push This Project to Your Hugging Face Space
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
## Prerequisites
|
| 6 |
|
|
@@ -23,10 +23,10 @@ git init
|
|
| 23 |
|
| 24 |
### 2. Add the Space as a remote
|
| 25 |
|
| 26 |
-
Replace `YOUR_HF_TOKEN` with your
|
| 27 |
|
| 28 |
```powershell
|
| 29 |
-
git remote add space https://
|
| 30 |
```
|
| 31 |
|
| 32 |
### 3. Add all files, commit, and push
|
|
@@ -48,23 +48,23 @@ Use `--force` because the Space already has a default `app.py`; you are replacin
|
|
| 48 |
|
| 49 |
```powershell
|
| 50 |
cd c:\Users\shail\Downloads
|
| 51 |
-
git clone https://huggingface.co/spaces/
|
| 52 |
-
cd
|
| 53 |
```
|
| 54 |
|
| 55 |
-
When prompted for **password**, paste your Hugging Face token (not your account password).
|
| 56 |
|
| 57 |
### 2. Copy this project’s files into the clone
|
| 58 |
|
| 59 |
-
From `notebooklm__clone`, copy everything **except** `.git` into
|
| 60 |
|
| 61 |
```powershell
|
| 62 |
cd c:\Users\shail\Downloads
|
| 63 |
-
Copy-Item -Path "notebooklm__clone\*" -Destination "
|
| 64 |
# Remove .git from copy if it was copied
|
| 65 |
-
Remove-Item -Path "
|
| 66 |
-
#
|
| 67 |
-
cd
|
| 68 |
git add .
|
| 69 |
git status
|
| 70 |
git commit -m "NotebookLM clone: full app with Gemini artifacts"
|
|
@@ -75,7 +75,7 @@ git push
|
|
| 75 |
|
| 76 |
## After pushing
|
| 77 |
|
| 78 |
-
1. Open **https://huggingface.co/spaces/
|
| 79 |
2. **Add Secrets** (required for artifacts and optional for chat):
|
| 80 |
- **Settings → Repository secrets** (or **Variables and secrets**):
|
| 81 |
- **`GEMINI_API_KEY`** = your Gemini API key (from https://aistudio.google.com/apikey)
|
|
@@ -87,7 +87,7 @@ git push
|
|
| 87 |
|
| 88 |
## If push asks for username/password
|
| 89 |
|
| 90 |
-
- **Username:**
|
| 91 |
- **Password:** your **Hugging Face access token** (with Write role), not your account password.
|
| 92 |
|
| 93 |
-
Using the remote URL with the token (Option A, step 2) avoids typing the password each time.
|
|
|
|
| 1 |
# Push This Project to Your Hugging Face Space
|
| 2 |
|
| 3 |
+
Replace `YOUR_USERNAME` and `YOUR_SPACE_NAME` with your actual HF username and Space name (e.g. `skumar54` and `Notebooklm`).
|
| 4 |
|
| 5 |
## Prerequisites
|
| 6 |
|
|
|
|
| 23 |
|
| 24 |
### 2. Add the Space as a remote
|
| 25 |
|
| 26 |
+
Replace `YOUR_USERNAME`, `YOUR_SPACE_NAME`, and `YOUR_HF_TOKEN` with your values.
|
| 27 |
|
| 28 |
```powershell
|
| 29 |
+
git remote add space https://YOUR_USERNAME:YOUR_HF_TOKEN@huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
|
| 30 |
```
|
| 31 |
|
| 32 |
### 3. Add all files, commit, and push
|
|
|
|
| 48 |
|
| 49 |
```powershell
|
| 50 |
cd c:\Users\shail\Downloads
|
| 51 |
+
git clone https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME YOUR_SPACE_FOLDER
|
| 52 |
+
cd YOUR_SPACE_FOLDER
|
| 53 |
```
|
| 54 |
|
| 55 |
+
When prompted for **password**, paste your Hugging Face **access token** (not your account password).
|
| 56 |
|
| 57 |
### 2. Copy this project’s files into the clone
|
| 58 |
|
| 59 |
+
From `notebooklm__clone`, copy everything **except** `.git` into the cloned folder (overwrite existing files like `app.py`). In PowerShell:
|
| 60 |
|
| 61 |
```powershell
|
| 62 |
cd c:\Users\shail\Downloads
|
| 63 |
+
Copy-Item -Path "notebooklm__clone\*" -Destination "YOUR_SPACE_FOLDER\" -Recurse -Force
|
| 64 |
# Remove .git from copy if it was copied
|
| 65 |
+
Remove-Item -Path "YOUR_SPACE_FOLDER\.git" -Recurse -Force -ErrorAction SilentlyContinue
|
| 66 |
+
# The space folder already has .git from clone
|
| 67 |
+
cd YOUR_SPACE_FOLDER
|
| 68 |
git add .
|
| 69 |
git status
|
| 70 |
git commit -m "NotebookLM clone: full app with Gemini artifacts"
|
|
|
|
| 75 |
|
| 76 |
## After pushing
|
| 77 |
|
| 78 |
+
1. Open **https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME** and wait for the Space to build (1–3 minutes).
|
| 79 |
2. **Add Secrets** (required for artifacts and optional for chat):
|
| 80 |
- **Settings → Repository secrets** (or **Variables and secrets**):
|
| 81 |
- **`GEMINI_API_KEY`** = your Gemini API key (from https://aistudio.google.com/apikey)
|
|
|
|
| 87 |
|
| 88 |
## If push asks for username/password
|
| 89 |
|
| 90 |
+
- **Username:** your Hugging Face username
|
| 91 |
- **Password:** your **Hugging Face access token** (with Write role), not your account password.
|
| 92 |
|
| 93 |
+
Using the remote URL with the token (Option A, step 2) avoids typing the password each time. Or use `huggingface-cli login` and push without token in the URL.
|