harpreetsahota commited on
Commit
0c21ebe
·
verified ·
1 Parent(s): ea77d11

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -6
README.md CHANGED
@@ -72,15 +72,28 @@ pip install -U fiftyone
72
  ## Usage
73
 
74
  ```python
 
75
  import fiftyone as fo
76
- from fiftyone.utils.huggingface import load_from_hub
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- # Load the dataset
79
- # Note: other available arguments include 'max_samples', etc
80
- dataset = load_from_hub("Voxel51/toon3d")
 
 
 
81
 
82
- # Launch the App
83
- session = fo.launch_app(dataset)
84
  ```
85
 
86
 
 
72
  ## Usage
73
 
74
  ```python
75
+
76
  import fiftyone as fo
77
+ from huggingface_hub import snapshot_download
78
+
79
+
80
+ # Download the dataset snapshot to the current working directory
81
+
82
+ snapshot_download(
83
+ repo_id="Voxel51/toon3d",
84
+ local_dir=".",
85
+ repo_type="dataset"
86
+ )
87
+
88
+
89
 
90
+ # Load dataset from current directory using FiftyOne's native format
91
+ dataset = fo.Dataset.from_dir(
92
+ dataset_dir=".", # Current directory contains the dataset files
93
+ dataset_type=fo.types.FiftyOneDataset, # Specify FiftyOne dataset format
94
+ name="toon3d" # Assign a name to the dataset for identification
95
+ )
96
 
 
 
97
  ```
98
 
99