bluemellophone commited on
Commit
b699492
·
unverified ·
1 Parent(s): f827118

Replace HuggingFace README

Browse files
Files changed (2) hide show
  1. README.md +12 -0
  2. README.rst +0 -184
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Wild Me ScoutBot
3
+ metaTitle: "The computer vision for Wild Me's Scout project"
4
+ emoji: 🌎
5
+ colorFrom: blue
6
+ colorTo: green
7
+ sdk: gradio
8
+ sdk_version: 3.1.4
9
+ app_file: app.py
10
+ pinned: true
11
+ python_version: 3.10.5
12
+ ---
README.rst DELETED
@@ -1,184 +0,0 @@
1
- ================
2
- Wild Me ScoutBot
3
- ================
4
-
5
- |Tests| |Codecov| |Wheel| |Docker| |ReadTheDocs| |Huggingface|
6
-
7
- .. contents:: Quick Links
8
- :backlinks: none
9
-
10
- .. sectnum::
11
-
12
- How to Install
13
- --------------
14
-
15
- .. code-block:: console
16
-
17
- (.venv) $ pip install scoutbot
18
-
19
- or, from source:
20
-
21
- .. code-block:: console
22
-
23
- git clone https://github.com/WildMeOrg/scoutbot
24
- cd scoutbot
25
- (.venv) $ pip install -e .
26
-
27
- To then add GPU acceleration, you need to replace `onnxruntime` with `onnxruntime-gpu`:
28
-
29
- .. code-block:: console
30
-
31
- (.venv) $ pip uninstall -y onnxruntime
32
- (.venv) $ pip install onnxruntime-gpu
33
-
34
- How to Run
35
- ----------
36
-
37
- You can run the tile-base Gradio demo with:
38
-
39
- .. code-block:: console
40
-
41
- (.venv) $ python app.py
42
-
43
- or, you can run the image-base Gradio demo with:
44
-
45
- .. code-block:: console
46
-
47
- (.venv) $ python app2.py
48
-
49
- Docker
50
- ------
51
-
52
- To run with Docker:
53
-
54
- .. code-block:: console
55
-
56
- docker run \
57
- -it \
58
- --rm \
59
- -p 7860:7860 \
60
- -e CONFIG=phase1 \
61
- -e WIC_BATCH_SIZE=512 \
62
- --gpus all \
63
- --name scoutbot \
64
- wildme/scoutbot:main \
65
- python3 app2.py
66
-
67
- To run with Docker Compose:
68
-
69
- .. code-block:: yaml
70
-
71
- version: "3"
72
-
73
- services:
74
- scoutbot:
75
- image: wildme/scoutbot:main
76
- command: python3 app2.py
77
- ports:
78
- - "7860:7860"
79
- environment:
80
- CONFIG: phase1
81
- WIC_BATCH_SIZE: 512
82
- restart: unless-stopped
83
- deploy:
84
- resources:
85
- reservations:
86
- devices:
87
- - driver: nvidia
88
- device_ids: ["all"]
89
- capabilities: [gpu]
90
-
91
- and run ``docker compose up -d``.
92
-
93
- The application can also be built into a Docker image and is hosted on Docker Hub as ``wildme/scoutbot:latest``.
94
-
95
- .. code-block:: console
96
-
97
- docker login
98
-
99
- export DOCKER_BUILDKIT=1
100
- export DOCKER_CLI_EXPERIMENTAL=enabled
101
- docker buildx create --name multi-arch-builder --use
102
-
103
- docker buildx build \
104
- -t wildme/scoutbot:latest \
105
- --platform linux/amd64 \
106
- --push \
107
- .
108
-
109
- Tests and Coverage
110
- ------------------
111
-
112
- You can run the automated tests in the ``tests/`` folder by running:
113
-
114
- .. code-block:: console
115
-
116
- (.venv) $ pip install -r requirements.optional.txt
117
- (.venv) $ pytest
118
-
119
- You may also get a coverage percentage by running:
120
-
121
- .. code-block:: console
122
-
123
- (.venv) $ coverage html
124
-
125
- and open the `coverage/html/index.html` file in your browser.
126
-
127
- Building Documentation
128
- ----------------------
129
-
130
- There is Sphinx documentation in the ``docs/`` folder, which can be built by running:
131
-
132
- .. code-block:: console
133
-
134
- (.venv) $ cd docs/
135
- (.venv) $ pip install -r requirements.optional.txt
136
- (.venv) $ sphinx-build -M html . build/
137
-
138
- Logging
139
- -------
140
-
141
- The script uses Python's built-in logging functionality called ``logging``. All print functions are replaced with ``log.info()``, which sends the output to two places:
142
-
143
- - 1. the terminal window, and
144
- - 2. the file `scoutbot.log`
145
-
146
- Code Formatting
147
- ---------------
148
-
149
- It's recommended that you use ``pre-commit`` to ensure linting procedures are run
150
- on any code you write. See `pre-commit.com <https://pre-commit.com/>`_ for more information.
151
-
152
- Reference `pre-commit's installation instructions <https://pre-commit.com/#install>`_ for software installation on your OS/platform. After you have the software installed, run ``pre-commit install`` on the command line. Now every time you commit to this project's code base the linter procedures will automatically run over the changed files. To run pre-commit on files preemtively from the command line use:
153
-
154
- .. code-block:: console
155
-
156
- (.venv) $ pip install -r requirements.optional.txt
157
- (.venv) $ pre-commit run --all-files
158
-
159
- The code base has been formatted by `Brunette <https://pypi.org/project/brunette/>`_, which is a fork and more configurable version of `Black <https://black.readthedocs.io/en/stable/>`_. Furthermore, try to conform to ``PEP8``. You should set up your preferred editor to use ``flake8`` as its Python linter, but pre-commit will ensure compliance before a git commit is completed. This will use the ``flake8`` configuration within ``setup.cfg``, which ignores several errors and stylistic considerations. See the ``setup.cfg`` file for a full and accurate listing of stylistic codes to ignore.
160
-
161
-
162
- .. |Tests| image:: https://github.com/WildMeOrg/scoutbot/actions/workflows/testing.yml/badge.svg?branch=main
163
- :target: https://github.com/WildMeOrg/scoutbot/actions/workflows/testing.yml
164
- :alt: GitHub CI
165
-
166
- .. |Codecov| image:: https://codecov.io/gh/WildMeOrg/scoutbot/branch/main/graph/badge.svg?token=FR6ITMWQNI
167
- :target: https://app.codecov.io/gh/WildMeOrg/scoutbot
168
- :alt: Codecov
169
-
170
- .. |Wheel| image:: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml/badge.svg
171
- :target: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml
172
- :alt: Python Wheel
173
-
174
- .. |Docker| image:: https://img.shields.io/docker/image-size/wildme/scoutbot/latest
175
- :target: https://hub.docker.com/r/wildme/scoutbot
176
- :alt: Docker
177
-
178
- .. |ReadTheDocs| image:: https://readthedocs.org/projects/scoutbot/badge/?version=latest
179
- :target: https://wildme-scoutbot.readthedocs.io/en/latest/?badge=latest
180
- :alt: ReadTheDocs
181
-
182
- .. |Huggingface| image:: https://img.shields.io/badge/HuggingFace-running-success
183
- :target: https://huggingface.co/spaces/WildMeOrg/scoutbot
184
- :alt: Huggingface