Task-332 Completed basic documentation for project.
Browse files- README.md +27 -3
- docs/index.md +27 -3
README.md
CHANGED
@@ -23,9 +23,31 @@ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-
|
|
23 |
Codebase for the Streamlit app hosted on Hugging Face Spaces that provides a basic user interface for performing inference on text input by the user using the models training within the NLPinitiative project.
|
24 |
|
25 |
---
|
|
|
26 |
### Project Setup
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
Due to the project being configured to use hugging face spaces to host the python web-app, the instructions will outline how to setup the project to push to any newly created Hugging Face Space.
|
31 |
|
@@ -45,16 +67,18 @@ Following these steps, any new commits made can be pushed to the HF Space by usi
|
|
45 |
`git push <hf-space-name> main`
|
46 |
|
47 |
---
|
|
|
48 |
### Project layout
|
49 |
|
50 |
```
|
51 |
βββ docs <- A directory containing documentation used for generating and serving
|
52 |
β project documentation
|
53 |
βββ scripts <- Source code for model inference
|
54 |
-
β βββ __init__.py <- Makes modeling a Python module
|
|
|
55 |
β βββ predict.py <- Code to run model inference with trained models
|
56 |
βββ app.py <- Entry point for the application
|
57 |
-
βββ config.
|
58 |
βββ LICENSE <- Open-source license if one is chosen
|
59 |
βββ mkdocs.yml <- mkdocs project configuration
|
60 |
βββ Pipfile <- The project dependency file for reproducing the analysis environment,
|
|
|
23 |
Codebase for the Streamlit app hosted on Hugging Face Spaces that provides a basic user interface for performing inference on text input by the user using the models training within the NLPinitiative project.
|
24 |
|
25 |
---
|
26 |
+
|
27 |
### Project Setup
|
28 |
|
29 |
+
For the purposes of building and running the project for development, a bash script `setup.sh` has been created to make the process of performing various development operations (defined below). Use of this script will require use of a bash shell (git bash for windows users).
|
30 |
+
|
31 |
+
This script can be activated by using `source ./setup.sh` while within the project source directory.
|
32 |
+
|
33 |
+
#### Commands
|
34 |
+
|
35 |
+
- `build`: This will setup a virtual environment within the project source directory and install all necessary dependencies for development.
|
36 |
+
- `clean`: This will deactivate the virutal environment, and remove the .venv directory (uninstalling all dependencies).
|
37 |
+
- `requirements` - *Important when pushing the codebase to the HF Space*: This will generate/update the `requirements.txt` file containing the required dependencies for the project.
|
38 |
+
- This is required for the HF space to properly download dependencies due to using `pip` for initializing the application.
|
39 |
+
- `docs build`: Parses the docstrings in the project and generates the project documentation using mkdocs.
|
40 |
+
- `docs serve`: Serves the mkdocs documentation to a local dev server that can be opened in a browser.
|
41 |
+
- `docs deploy`: Deploys the mkdocs documentation to the linked GitHub repositories 'GitHub Pages'.
|
42 |
+
- `run dev`: Runs the Streamlit application locally for monitored development.
|
43 |
+
- `set bin_repo <HF Model Repository>`: Sets the binary model repository ID to the specified string.
|
44 |
+
- This is the source for downloading the model tensor file.
|
45 |
+
- `set ml_repo <HF Model Repository>`: Sets the multilabel regression model repository ID to the specified string.
|
46 |
+
- This is the source for downloading the model tensor file.
|
47 |
+
- `set ds_repo <HF Dataset Repository>`: Sets the dataset repository ID to the specified string.
|
48 |
+
- This is the source for downloading the datasets.
|
49 |
+
|
50 |
+
#### HF Spaces Setup
|
51 |
|
52 |
Due to the project being configured to use hugging face spaces to host the python web-app, the instructions will outline how to setup the project to push to any newly created Hugging Face Space.
|
53 |
|
|
|
67 |
`git push <hf-space-name> main`
|
68 |
|
69 |
---
|
70 |
+
|
71 |
### Project layout
|
72 |
|
73 |
```
|
74 |
βββ docs <- A directory containing documentation used for generating and serving
|
75 |
β project documentation
|
76 |
βββ scripts <- Source code for model inference
|
77 |
+
β βββ __init__.py <- Makes modeling a Python module
|
78 |
+
β βββ config.py <- Store useful variables and configuration
|
79 |
β βββ predict.py <- Code to run model inference with trained models
|
80 |
βββ app.py <- Entry point for the application
|
81 |
+
βββ config.toml <- Stores HF repository information
|
82 |
βββ LICENSE <- Open-source license if one is chosen
|
83 |
βββ mkdocs.yml <- mkdocs project configuration
|
84 |
βββ Pipfile <- The project dependency file for reproducing the analysis environment,
|
docs/index.md
CHANGED
@@ -9,9 +9,31 @@
|
|
9 |
Codebase for the Streamlit app hosted on Hugging Face Spaces that provides a basic user interface for performing inference on text input by the user using the models training within the NLPinitiative project.
|
10 |
|
11 |
---
|
|
|
12 |
### Project Setup
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
Due to the project being configured to use hugging face spaces to host the python web-app, the instructions will outline how to setup the project to push to any newly created Hugging Face Space.
|
17 |
|
@@ -31,16 +53,18 @@ Following these steps, any new commits made can be pushed to the HF Space by usi
|
|
31 |
`git push <hf-space-name> main`
|
32 |
|
33 |
---
|
|
|
34 |
### Project layout
|
35 |
|
36 |
```
|
37 |
βββ docs <- A directory containing documentation used for generating and serving
|
38 |
β project documentation
|
39 |
βββ scripts <- Source code for model inference
|
40 |
-
β βββ __init__.py <- Makes modeling a Python module
|
|
|
41 |
β βββ predict.py <- Code to run model inference with trained models
|
42 |
βββ app.py <- Entry point for the application
|
43 |
-
βββ config.
|
44 |
βββ LICENSE <- Open-source license if one is chosen
|
45 |
βββ mkdocs.yml <- mkdocs project configuration
|
46 |
βββ Pipfile <- The project dependency file for reproducing the analysis environment,
|
|
|
9 |
Codebase for the Streamlit app hosted on Hugging Face Spaces that provides a basic user interface for performing inference on text input by the user using the models training within the NLPinitiative project.
|
10 |
|
11 |
---
|
12 |
+
|
13 |
### Project Setup
|
14 |
|
15 |
+
For the purposes of building and running the project for development, a bash script `setup.sh` has been created to make the process of performing various development operations (defined below). Use of this script will require use of a bash shell (git bash for windows users).
|
16 |
+
|
17 |
+
This script can be activated by using `source ./setup.sh` while within the project source directory.
|
18 |
+
|
19 |
+
#### Commands
|
20 |
+
|
21 |
+
- `build`: This will setup a virtual environment within the project source directory and install all necessary dependencies for development.
|
22 |
+
- `clean`: This will deactivate the virutal environment, and remove the .venv directory (uninstalling all dependencies).
|
23 |
+
- `requirements` - *Important when pushing the codebase to the HF Space*: This will generate/update the `requirements.txt` file containing the required dependencies for the project.
|
24 |
+
- This is required for the HF space to properly download dependencies due to using `pip` for initializing the application.
|
25 |
+
- `docs build`: Parses the docstrings in the project and generates the project documentation using mkdocs.
|
26 |
+
- `docs serve`: Serves the mkdocs documentation to a local dev server that can be opened in a browser.
|
27 |
+
- `docs deploy`: Deploys the mkdocs documentation to the linked GitHub repositories 'GitHub Pages'.
|
28 |
+
- `run dev`: Runs the Streamlit application locally for monitored development.
|
29 |
+
- `set bin_repo <HF Model Repository>`: Sets the binary model repository ID to the specified string.
|
30 |
+
- This is the source for downloading the model tensor file.
|
31 |
+
- `set ml_repo <HF Model Repository>`: Sets the multilabel regression model repository ID to the specified string.
|
32 |
+
- This is the source for downloading the model tensor file.
|
33 |
+
- `set ds_repo <HF Dataset Repository>`: Sets the dataset repository ID to the specified string.
|
34 |
+
- This is the source for downloading the datasets.
|
35 |
+
|
36 |
+
#### HF Spaces Setup
|
37 |
|
38 |
Due to the project being configured to use hugging face spaces to host the python web-app, the instructions will outline how to setup the project to push to any newly created Hugging Face Space.
|
39 |
|
|
|
53 |
`git push <hf-space-name> main`
|
54 |
|
55 |
---
|
56 |
+
|
57 |
### Project layout
|
58 |
|
59 |
```
|
60 |
βββ docs <- A directory containing documentation used for generating and serving
|
61 |
β project documentation
|
62 |
βββ scripts <- Source code for model inference
|
63 |
+
β βββ __init__.py <- Makes modeling a Python module
|
64 |
+
β βββ config.py <- Store useful variables and configuration
|
65 |
β βββ predict.py <- Code to run model inference with trained models
|
66 |
βββ app.py <- Entry point for the application
|
67 |
+
βββ config.toml <- Stores HF repository information
|
68 |
βββ LICENSE <- Open-source license if one is chosen
|
69 |
βββ mkdocs.yml <- mkdocs project configuration
|
70 |
βββ Pipfile <- The project dependency file for reproducing the analysis environment,
|