Spaces:
Sleeping
Sleeping
artelabsuper
commited on
Commit
·
af0160d
1
Parent(s):
47e85fc
demo start
Browse files- .gitignore +2 -0
- README.md +10 -0
- app.py +14 -0
- packages.txt +1 -0
- requirements.txt +1 -0
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
venv
|
| 2 |
+
__pycache__
|
README.md
CHANGED
|
@@ -10,3 +10,13 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
```
|
| 16 |
+
python3.8 -m venv venv
|
| 17 |
+
source venv/bin/activate
|
| 18 |
+
|
| 19 |
+
pip install -r requirements.txt
|
| 20 |
+
|
| 21 |
+
python -m streamlit run --server.address 127.0.0.1 app.py
|
| 22 |
+
```
|
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import zipfile
|
| 3 |
+
|
| 4 |
+
st.title('Sentinel 2 Crop Mapping')
|
| 5 |
+
st.markdown('Using a <model> and giving a zip that contains 32 tiff named correctly you can reach prediction of crop mapping og the area.')
|
| 6 |
+
|
| 7 |
+
file_uploaded = st.file_uploader(
|
| 8 |
+
"Upload",
|
| 9 |
+
type=["zip"],
|
| 10 |
+
accept_multiple_files=False,
|
| 11 |
+
)
|
| 12 |
+
if file_uploaded is not None:
|
| 13 |
+
with zipfile.ZipFile(file_uploaded, "r") as z:
|
| 14 |
+
z.extractall(".")
|
packages.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
unzip
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
streamlit
|