Sunday, December 4, 2022

Invoice Annotation with Sparrow/Python

I explain our Streamlit component for invoice/receipt document annotation and labeling. It can be used either to create new annotations or review and edit existing ones. With this component you can add new annotations directly on top of the document image. Existing annotations can be resized/moved and values/labels assigned. 

This component is part of Sparrow - our open-source solution for data extraction from invoices/receipts with ML.

 

Monday, November 28, 2022

Responsive UI with Streamlit/Python

I explain how to get current UI width info in Streamlit and use this value to calculate number of columns to be generated for the form block. Streamlit is server side UI framework and it runs on Python.

 

Sunday, November 20, 2022

Calling JavaScript from Streamlit/Python

Streamlit is Python framework, it helps to build UI with low code approach. Code runs on server and there is no functionality, which would allow to inject client side events with JavaScript. Luckily there is a 3rd-party Streamlit component, it allows to make JavaScript calls from server side Python code. Response from such JavaScript call is received within the same Streamlit execution, this makes it possible to use values returned from JavaScript in Python logic. In this example, I show one liner JavaScript call to get UI screen width, to be able to calculate layout structure adjustments in Python, based on the screen size.

 

Saturday, November 12, 2022

Building Streamlit/Python Dynamic Forms

Streamlit is great to build Web UIs for data apps. Dynamic UIs are common requirement for data apps. Data structures usually dynamic, set of attributes is changing and this requires dynamic UI. I explain how to generate dynamic forms with Streamlit. It works very smooth.

 

Sunday, November 6, 2022

Streamlit/Python Drawable Canvas - Element Selection (React JS)

With Streamlit component you can render canvas and draw. I explain how this canvas component implements object selection and passes data from React canvas to Streamlit.

 

Sunday, October 30, 2022

Understanding Streamlit/Python Application Flow

Streamlit re-executes Python script, each time when the request is sent to the server. You should keep this in mind when building Streamlit apps. There are scenarios when you want to make sure code is not executed on subsequent call. You can control this with Streamlit session object.

 

Sunday, October 23, 2022

Streamlit/Python Handling Fast Data Entry

I explain how to enable fast data entry in Streamlit with form component. By default, Streamlit input components execute server call on data change. When wrapped by form component, changes are sent to the server in batch, when Save button is pressed.