Spaces:
Sleeping
Sleeping
File size: 683 Bytes
d8f309f 66ebefb d8f309f 66ebefb f42d8b2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
---
title: LayoutLM Invoice
emoji: π
colorFrom: pink
colorTo: blue
sdk: gradio
sdk_version: 4.19.1
app_file: app.py
pinned: false
---
## LayoutLM for Invoice
### Pre-requirements
Tesseract requires you to install `tesseract-ocr` via `apt` command, just adding it in `packages.txt`.
```text
tesseract-ocr
```
### Secure
This service is private application, requires user name and password (ref. secret variable `USERNAME` & `PASSWORD`).
```python
def auth(username, password):
u = os.environ.get('USERNAME')
p = os.environ.get('PASSWORD')
return (username == u and password == p)
with gr.Blocks() as demo:
# setup layout here...
demo.launch(auth=auth)
```
|