Spaces:
Sleeping
Sleeping
Commit ·
936744c
1
Parent(s): 77218ab
chore: Add lessons notes about LFS
Browse files- LESSONS.md +22 -0
- app.py +0 -6
LESSONS.md
CHANGED
|
@@ -31,6 +31,12 @@ git lfs install
|
|
| 31 |
|
| 32 |
```bash
|
| 33 |
git lfs track "olist.db"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
```
|
| 35 |
|
| 36 |
2. **Edit `.gitignore` **
|
|
@@ -56,6 +62,22 @@ git lfs install
|
|
| 56 |
git push origin main
|
| 57 |
```
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
## 2. 🌊 Marimo: Code Display Behavior
|
| 60 |
|
| 61 |
By default, **Marimo hides the code cells** in the deployed (read-only) version of your app, especially when running as a Hugging Face Space or a `.py` script.
|
|
|
|
| 31 |
|
| 32 |
```bash
|
| 33 |
git lfs track "olist.db"
|
| 34 |
+
git lfs track "*.png"
|
| 35 |
+
git lfs track "*.jpg"
|
| 36 |
+
git lfs track "*.csv"
|
| 37 |
+
|
| 38 |
+
# This adds patterns to a .gitattributes file. For exampple :
|
| 39 |
+
# *.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
```
|
| 41 |
|
| 42 |
2. **Edit `.gitignore` **
|
|
|
|
| 62 |
git push origin main
|
| 63 |
```
|
| 64 |
|
| 65 |
+
5. **(Optional) Fix Mistakes If You Added a Binary File the Wrong Way**
|
| 66 |
+
|
| 67 |
+
If you accidentally committed a binary file without LFS, you’ll need to:
|
| 68 |
+
|
| 69 |
+
```bash
|
| 70 |
+
# Remove the file from Git history
|
| 71 |
+
git lfs track "*.png" # if not already
|
| 72 |
+
git rm --cached public/erd-schema.png # remove from Git index
|
| 73 |
+
git add public/erd-schema.png # re-add to index, now tracked via LFS
|
| 74 |
+
git commit -m "Re-add image using Git LFS"
|
| 75 |
+
|
| 76 |
+
# Rewrite history to remove the original large file
|
| 77 |
+
git filter-repo --path public/erd-schema.png --invert-paths
|
| 78 |
+
git push --force origin main
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
## 2. 🌊 Marimo: Code Display Behavior
|
| 82 |
|
| 83 |
By default, **Marimo hides the code cells** in the deployed (read-only) version of your app, especially when running as a Hugging Face Space or a `.py` script.
|
app.py
CHANGED
|
@@ -39,12 +39,6 @@ def _(mo):
|
|
| 39 |
* Freight and delivery performance
|
| 40 |
* Customer locations and product categories
|
| 41 |
* Customer reviews and satisfaction
|
| 42 |
-
|
| 43 |
-
Additional geolocation data and a complementary **Marketing Funnel dataset** allow for multi-dimensional analysis—from first click to final delivery.
|
| 44 |
-
|
| 45 |
-
This anonymized dataset was provided by **Olist**, Brazil’s largest department store in online marketplaces.
|
| 46 |
-
Learn more at [olist.com](https://www.olist.com).
|
| 47 |
-
|
| 48 |
""")
|
| 49 |
|
| 50 |
erd_diagram = mo.md("""### Entity Relationship Diagram
|
|
|
|
| 39 |
* Freight and delivery performance
|
| 40 |
* Customer locations and product categories
|
| 41 |
* Customer reviews and satisfaction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
""")
|
| 43 |
|
| 44 |
erd_diagram = mo.md("""### Entity Relationship Diagram
|