giswqs commited on
Commit
e3721b9
1 Parent(s): 3ba0c06

Updated README

Browse files
Files changed (2) hide show
  1. README.md +46 -1
  2. pages/00_home.py +21 -16
README.md CHANGED
@@ -9,4 +9,49 @@ license: mit
9
  app_port: 8765
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  app_port: 8765
10
  ---
11
 
12
+ ## Earth Engine Web Apps
13
+
14
+ ### Introduction
15
+
16
+ **A collection of Earth Engine web apps developed using [Solara](https://github.com/widgetti/solara) and geemap**
17
+
18
+ - Web App: <https://giswqs-solara-geemap.hf.space>
19
+ - GitHub: <https://github.com/opengeos/solara-geemap>
20
+ - Hugging Face: <https://huggingface.co/spaces/giswqs/solara-geemap>
21
+
22
+ ### How to deploy this app on Hugging Face Spaces
23
+
24
+ 1. Go to <https://huggingface.co/spaces/giswqs/solara-geemap/tree/main> and duplicate the space to your own space.
25
+
26
+ ![](https://i.imgur.com/gTg4V2x.png)
27
+
28
+ 2. You need to set `EARTHENGINE_TOKEN` in order to use Earth Engine. The token value should be copied from the following file depending on your operating system:
29
+
30
+ ```text
31
+ Windows: C:\\Users\\USERNAME\\.config\\earthengine\\credentials
32
+ Linux: /home/USERNAME/.config/earthengine/credentials
33
+ MacOS: /Users/USERNAME/.config/earthengine/credentials
34
+ ```
35
+
36
+ Simply open the file and copy **ALL** the content to the `EARTHENGINE_TOKEN` environment variable.
37
+
38
+ ![](https://i.imgur.com/i04gzyH.png)
39
+
40
+ ![](https://i.imgur.com/Ex37Ut7.png)
41
+
42
+ Alternatively, you can run the following code to retrieve your Earth Engine token:
43
+
44
+ ```python
45
+ import geemap
46
+ geemap.get_ee_token()
47
+ ```
48
+
49
+ Copy all the content of the printed token and set it as the `EARTHENGINE_TOKEN` environment variable.
50
+
51
+ 3. After the space is built successfully, click the `Embed this Space` menu and find the `Direct URL` for the app, such as <https://giswqs-solara-geemap.hf.space>.
52
+
53
+ ![](https://i.imgur.com/DNM36sk.png)
54
+
55
+ ![](https://i.imgur.com/KX82lSf.png)
56
+
57
+ 4. Add your own apps (\*.py) to the `pages` folder.
pages/00_home.py CHANGED
@@ -18,34 +18,39 @@ def Page():
18
 
19
  ### How to deploy this app on Hugging Face Spaces
20
 
21
- 1. Go to <https://huggingface.co/spaces/giswqs/voila-geospatial/tree/main> and duplicate the space to your own space.
22
 
23
- ![](https://i.imgur.com/4ib5BzB.png)
24
 
25
- 2. Set environment variables as needed. For example, if you use Google Earth Engine, you need to set `EARTHENGINE_TOKEN` to your Earth Engine token. The token value should be copied from the following file depending on your operating system:
26
 
27
- ```text
28
- Windows: C:\\Users\\USERNAME\\.config\\earthengine\\credentials
29
- Linux: /home/USERNAME/.config/earthengine/credentials
30
- MacOS: /Users/USERNAME/.config/earthengine/credentials
31
- ```
32
 
33
- Simply open the file and copy **ALL** the content to the `EARTHENGINE_TOKEN` environment variable.
34
 
35
- ![](https://i.imgur.com/i04gzyH.png)
36
 
37
- ![](https://i.imgur.com/Ex37Ut7.png)
38
 
39
- 3. After the space is built successfully, click the `Embed this Space` menu and find the `Direct URL` for the app, such as <https://giswqs-voila-geospatial.hf.space>.
40
 
41
- ![](https://i.imgur.com/V2Lp0dP.png)
 
 
 
42
 
43
- ![](https://i.imgur.com/klhR5FL.png)
44
 
45
- 4. Add your own notebooks to the `notebooks` folder and wait for the app to be rebuilt.
46
 
47
- 5. To hide the source code from the notebook, modify `run.sh` and set `--strip_sources=True`.
48
 
 
 
 
49
 
50
  """
51
 
 
18
 
19
  ### How to deploy this app on Hugging Face Spaces
20
 
21
+ 1. Go to <https://huggingface.co/spaces/giswqs/solara-geemap/tree/main> and duplicate the space to your own space.
22
 
23
+ ![](https://i.imgur.com/gTg4V2x.png)
24
 
25
+ 2. You need to set `EARTHENGINE_TOKEN` in order to use Earth Engine. The token value should be copied from the following file depending on your operating system:
26
 
27
+ ```text
28
+ Windows: C:\\Users\\USERNAME\\.config\\earthengine\\credentials
29
+ Linux: /home/USERNAME/.config/earthengine/credentials
30
+ MacOS: /Users/USERNAME/.config/earthengine/credentials
31
+ ```
32
 
33
+ Simply open the file and copy **ALL** the content to the `EARTHENGINE_TOKEN` environment variable.
34
 
35
+ ![](https://i.imgur.com/i04gzyH.png)
36
 
37
+ ![](https://i.imgur.com/Ex37Ut7.png)
38
 
 
39
 
40
+ ```python
41
+ import geemap
42
+ geemap.get_ee_token()
43
+ ```
44
 
45
+ Copy all the content of the printed token and set it as the `EARTHENGINE_TOKEN` environment variable.
46
 
47
+ 3. After the space is built successfully, click the `Embed this Space` menu and find the `Direct URL` for the app, such as <https://giswqs-solara-geemap.hf.space>.
48
 
49
+ ![](https://i.imgur.com/DNM36sk.png)
50
 
51
+ ![](https://i.imgur.com/KX82lSf.png)
52
+
53
+ 4. Add your own apps (*.py) to the `pages` folder.
54
 
55
  """
56