caviri
commited on
Commit
·
30b5747
1
Parent(s):
b77c9e9
feat: Fix for tmp_json
Browse files- .gitignore +1 -1
- Dockerfile +8 -4
- README.md +7 -188
- app/assets/tmp_json/.gitkeep +0 -0
- app/main.py +1 -1
- app/styling/style.py +13 -13
- app/styling/theme.py +2 -1
- requirements.txt +1 -1
.gitignore
CHANGED
|
@@ -8,7 +8,7 @@ __pycache__/
|
|
| 8 |
#Data
|
| 9 |
test/data/**
|
| 10 |
data/**
|
| 11 |
-
app/assets/tmp_json
|
| 12 |
|
| 13 |
# C extensions
|
| 14 |
*.so
|
|
|
|
| 8 |
#Data
|
| 9 |
test/data/**
|
| 10 |
data/**
|
| 11 |
+
app/assets/tmp_json/*.json
|
| 12 |
|
| 13 |
# C extensions
|
| 14 |
*.so
|
Dockerfile
CHANGED
|
@@ -1,7 +1,11 @@
|
|
| 1 |
-
From ubuntu:latest
|
| 2 |
|
| 3 |
-
RUN apt-get update
|
| 4 |
-
RUN apt-get install python3 python3-pip -y
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
|
| 7 |
# https://veronneau.org/python-311-pip-and-breaking-system-packages.html
|
|
@@ -38,4 +42,4 @@ RUN pip3 install -r /digiwild/requirements.txt
|
|
| 38 |
|
| 39 |
WORKDIR /digiwild
|
| 40 |
|
| 41 |
-
ENTRYPOINT python3 main.py
|
|
|
|
| 1 |
+
# From ubuntu:latest
|
| 2 |
|
| 3 |
+
# RUN apt-get update
|
| 4 |
+
# RUN apt-get install python3 python3-pip -y
|
| 5 |
+
FROM ubuntu:22.04
|
| 6 |
+
|
| 7 |
+
RUN apt update
|
| 8 |
+
RUN apt install python3.10 python3-pip -y
|
| 9 |
|
| 10 |
# https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
|
| 11 |
# https://veronneau.org/python-311-pip-and-breaking-system-packages.html
|
|
|
|
| 42 |
|
| 43 |
WORKDIR /digiwild
|
| 44 |
|
| 45 |
+
ENTRYPOINT python3 app/main.py
|
README.md
CHANGED
|
@@ -13,7 +13,7 @@ short_description: Digiwild
|
|
| 13 |
## Docker
|
| 14 |
|
| 15 |
```
|
| 16 |
-
|
| 17 |
```
|
| 18 |
|
| 19 |
```
|
|
@@ -25,6 +25,12 @@ cd /digiwild/app
|
|
| 25 |
python3 main.py
|
| 26 |
```
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
## Needs
|
| 29 |
|
| 30 |
- Camera with multiples pictures?
|
|
@@ -33,190 +39,3 @@ python3 main.py
|
|
| 33 |
- Comments
|
| 34 |
- Symptomps selection (Dropdown)
|
| 35 |
|
| 36 |
-
## ornitho.ch schema
|
| 37 |
-
|
| 38 |
-
After selecting the species
|
| 39 |
-
|
| 40 |
-
```
|
| 41 |
-
- dead
|
| 42 |
-
- wounded
|
| 43 |
-
|
| 44 |
-
- Collision with a means of transport
|
| 45 |
-
- road vehicle
|
| 46 |
-
- road type (Options)
|
| 47 |
-
- highway
|
| 48 |
-
- main road
|
| 49 |
-
- secondary road
|
| 50 |
-
- local road/path/trail
|
| 51 |
-
- parking lot
|
| 52 |
-
- other
|
| 53 |
-
- unknown
|
| 54 |
-
- infrastructure number (Open)
|
| 55 |
-
- train
|
| 56 |
-
- infrastructure number (Open)
|
| 57 |
-
- aircraft
|
| 58 |
-
- boat
|
| 59 |
-
- other
|
| 60 |
-
- unknown
|
| 61 |
-
- Destruction / Deliberatly removed
|
| 62 |
-
- hunting
|
| 63 |
-
- shooting
|
| 64 |
-
- bow
|
| 65 |
-
- falconry
|
| 66 |
-
- hounds hunting
|
| 67 |
-
- digging up
|
| 68 |
-
- other
|
| 69 |
-
- unknown
|
| 70 |
-
- trap
|
| 71 |
-
- killing trap
|
| 72 |
-
- pole trap
|
| 73 |
-
- trap cage
|
| 74 |
-
- corvids nasse
|
| 75 |
-
- net
|
| 76 |
-
- cage trap
|
| 77 |
-
- fall-trap
|
| 78 |
-
- glue trap
|
| 79 |
-
- insect trap
|
| 80 |
-
- other
|
| 81 |
-
- unknown
|
| 82 |
-
- poisoning
|
| 83 |
-
- removal or direct capture
|
| 84 |
-
- gassing
|
| 85 |
-
- raptor captured at nest
|
| 86 |
-
- brood destruction
|
| 87 |
-
- traffic/trade
|
| 88 |
-
- capture accident
|
| 89 |
-
- scientific sample
|
| 90 |
-
- other
|
| 91 |
-
- unknown
|
| 92 |
-
- fishing
|
| 93 |
-
- drowned/tangled
|
| 94 |
-
- beached with capture indications
|
| 95 |
-
- other
|
| 96 |
-
- unknown
|
| 97 |
-
- other
|
| 98 |
-
- unkown
|
| 99 |
-
- Indirect destruction
|
| 100 |
-
- pylone and electric grid
|
| 101 |
-
- object (Options)
|
| 102 |
-
- electric line
|
| 103 |
-
- pole/pylon
|
| 104 |
-
- other
|
| 105 |
-
- unknown
|
| 106 |
-
- cause (Options)
|
| 107 |
-
- collision
|
| 108 |
-
- electrocution
|
| 109 |
-
- unknown
|
| 110 |
-
- windfarm
|
| 111 |
-
- other collision
|
| 112 |
-
- Object (Options)
|
| 113 |
-
- window
|
| 114 |
-
- building
|
| 115 |
-
- lighthouse
|
| 116 |
-
- cable
|
| 117 |
-
- wire fence/barbed wire
|
| 118 |
-
- other crash
|
| 119 |
-
- unknown
|
| 120 |
-
- fall
|
| 121 |
-
- Object (Options)
|
| 122 |
-
- chimney
|
| 123 |
-
- empty pole
|
| 124 |
-
- hole/well
|
| 125 |
-
- other
|
| 126 |
-
- unknown
|
| 127 |
-
- development work
|
| 128 |
-
- Type (Options)
|
| 129 |
-
- transport infrastructure
|
| 130 |
-
- building
|
| 131 |
-
- other
|
| 132 |
-
- unknown
|
| 133 |
-
- pollution / contamination
|
| 134 |
-
- Type (Options)
|
| 135 |
-
- oil pollution
|
| 136 |
-
- chemical pollution
|
| 137 |
-
- heavy metals
|
| 138 |
-
- light
|
| 139 |
-
- noise
|
| 140 |
-
- plastic ingestion
|
| 141 |
-
- other
|
| 142 |
-
- unknown
|
| 143 |
-
- agricultural net protection
|
| 144 |
-
- vegetal / forest work
|
| 145 |
-
- Type (Options)
|
| 146 |
-
- clearing/mowing/plowing
|
| 147 |
-
- tree felling/pruning
|
| 148 |
-
- other
|
| 149 |
-
- unknown
|
| 150 |
-
- other
|
| 151 |
-
- unknown
|
| 152 |
-
- Natural cause
|
| 153 |
-
- predation
|
| 154 |
-
- responsible (Options)
|
| 155 |
-
- cat
|
| 156 |
-
- dog
|
| 157 |
-
- rooster/hen
|
| 158 |
-
- other domestic animal
|
| 159 |
-
- wild birds
|
| 160 |
-
- wild mammal
|
| 161 |
-
- other
|
| 162 |
-
- unknown
|
| 163 |
-
- weather
|
| 164 |
-
- Type (Options)
|
| 165 |
-
- cold wave
|
| 166 |
-
- drought
|
| 167 |
-
- hail
|
| 168 |
-
- lightening
|
| 169 |
-
- storm
|
| 170 |
-
- other
|
| 171 |
-
- unknown
|
| 172 |
-
- natural disaster
|
| 173 |
-
- Type (Options)
|
| 174 |
-
- fire
|
| 175 |
-
- avalanche
|
| 176 |
-
- rock fall
|
| 177 |
-
- mudslide
|
| 178 |
-
- volcanic eruption/ashes
|
| 179 |
-
- other
|
| 180 |
-
- unknown
|
| 181 |
-
- nest fall
|
| 182 |
-
- strading due to exhaustion
|
| 183 |
-
- disease/parasite
|
| 184 |
-
- accidental drowing
|
| 185 |
-
- Container (Options)
|
| 186 |
-
- drinking trough
|
| 187 |
-
- pool
|
| 188 |
-
- storm pool
|
| 189 |
-
- irrigation pool
|
| 190 |
-
- natural pool
|
| 191 |
-
- flood
|
| 192 |
-
- other container
|
| 193 |
-
- unknown
|
| 194 |
-
- other
|
| 195 |
-
- unknown
|
| 196 |
-
- Unknown
|
| 197 |
-
|
| 198 |
-
- Event follow-up
|
| 199 |
-
- Animal collected (Options)
|
| 200 |
-
- Yes
|
| 201 |
-
- No
|
| 202 |
-
- Recipient (Options)
|
| 203 |
-
- Veterinary
|
| 204 |
-
- Care center
|
| 205 |
-
- Local Museum
|
| 206 |
-
- National Museum
|
| 207 |
-
- Other
|
| 208 |
-
- Radiography (Options)
|
| 209 |
-
- Yes
|
| 210 |
-
- No
|
| 211 |
-
- Unknown
|
| 212 |
-
- Given answer (Options)
|
| 213 |
-
- Nothing
|
| 214 |
-
- Complaint against X
|
| 215 |
-
- Complaint
|
| 216 |
-
- Police call
|
| 217 |
-
- Discussion with the speaker
|
| 218 |
-
- Press release
|
| 219 |
-
- Unknown
|
| 220 |
-
- Name of recipient / museum (Open)
|
| 221 |
-
- Collection reference (Open)
|
| 222 |
-
```
|
|
|
|
| 13 |
## Docker
|
| 14 |
|
| 15 |
```
|
| 16 |
+
docker build -t ordes/digiwild .
|
| 17 |
```
|
| 18 |
|
| 19 |
```
|
|
|
|
| 25 |
python3 main.py
|
| 26 |
```
|
| 27 |
|
| 28 |
+
### How to develop on docker
|
| 29 |
+
|
| 30 |
+
```
|
| 31 |
+
docker run -it -p 7860:3333 -v $(pwd):/digiwild
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
## Needs
|
| 35 |
|
| 36 |
- Camera with multiples pictures?
|
|
|
|
| 39 |
- Comments
|
| 40 |
- Symptomps selection (Dropdown)
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/assets/tmp_json/.gitkeep
ADDED
|
File without changes
|
app/main.py
CHANGED
|
@@ -19,7 +19,7 @@ from styling.style import *
|
|
| 19 |
from styling.theme import css
|
| 20 |
|
| 21 |
# with gr.Blocks(theme=theme, css=css) as demo:
|
| 22 |
-
with gr.Blocks(
|
| 23 |
create_json_all_individuals()
|
| 24 |
# ---------------------------------------------------------
|
| 25 |
# Intro Text
|
|
|
|
| 19 |
from styling.theme import css
|
| 20 |
|
| 21 |
# with gr.Blocks(theme=theme, css=css) as demo:
|
| 22 |
+
with gr.Blocks(theme='shivi/calm_seafoam') as demo:
|
| 23 |
create_json_all_individuals()
|
| 24 |
# ---------------------------------------------------------
|
| 25 |
# Intro Text
|
app/styling/style.py
CHANGED
|
@@ -2,19 +2,19 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
gr.HTML('''
|
| 4 |
<style>
|
| 5 |
-
.custom-button {
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
}
|
| 18 |
</style>
|
| 19 |
''')
|
| 20 |
|
|
|
|
| 2 |
|
| 3 |
gr.HTML('''
|
| 4 |
<style>
|
| 5 |
+
# .custom-button {
|
| 6 |
+
# background-color: #3B4C54;
|
| 7 |
+
# border: none;
|
| 8 |
+
# color: white;
|
| 9 |
+
# padding: 15px 32px;
|
| 10 |
+
# text-align: center;
|
| 11 |
+
# text-decoration: none;
|
| 12 |
+
# display: inline-block;
|
| 13 |
+
# font-size: 16px;
|
| 14 |
+
# margin: 4px 2px;
|
| 15 |
+
# cursor: pointer;
|
| 16 |
+
# border-radius: 8px;
|
| 17 |
+
# }
|
| 18 |
</style>
|
| 19 |
''')
|
| 20 |
|
app/styling/theme.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
css
|
|
|
|
| 4 |
.gradio-container {background: url(https://openclipart.org/image/2000px/279687)}
|
| 5 |
|
| 6 |
/* Main background */
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
css= ""
|
| 4 |
+
css_old = """
|
| 5 |
.gradio-container {background: url(https://openclipart.org/image/2000px/279687)}
|
| 6 |
|
| 7 |
/* Main background */
|
requirements.txt
CHANGED
|
@@ -3,4 +3,4 @@ gradio_modal
|
|
| 3 |
geopy
|
| 4 |
geopandas
|
| 5 |
pillow
|
| 6 |
-
dotenv
|
|
|
|
| 3 |
geopy
|
| 4 |
geopandas
|
| 5 |
pillow
|
| 6 |
+
python-dotenv
|