lit_doccano component
This
lightning init component lit-doccano
To run lit_doccano
First, install lit_doccano (warning: this component has not been officially approved on the lightning gallery):
lightning install component https://github.com/tshu-w/lit-doccano
Then, install NGINX in whatever way, make sure nginx
command is available
Setup virtualenv
NOTE: Use conda
for Lightning and use venv
for the component.
- setup vritual env
virtualenv ~/venv-doccano
source ~/venv-doccano/bin/activate; python -m pip install doccano; deactivate
- test
source ~/venv-doccano/bin/activate; doccano --help; deactivate
Once the app is installed, use it in an app:
from lit_doccano import LitDoccano
import lightning as L
class LitApp(L.LightningFlow):
def __init__(self) -> None:
super().__init__()
self.lit_doccano = LitDoccano()
def run(self):
self.lit_doccano.run()
def configure_layout(self):
return [{'name': 'doccano', 'content': self.lit_doccano}]
app = L.LightningApp(LitApp())