Funix - The laziest way to build GUI apps in Python

Forrest Sheng Bao, Mike Qi, Ruixuan Tu, Erana Wan · Proceedings of the Python in Science Conferences · 2024

The rise of machine learning ( ML ) and artificial intelligence ( AI ), especially the generative AI ( GenAI ), has increased the need for wrapping models or algorithms into GUI apps. For example, a large language model ( LLM ) can be accessed through a string-to-string GUI app with a textbox as the primary input. Most of existing solutions require developers to manually create widgets and link them to arguments/returns of a function individually. This low-level process is laborious and usually intrusive. Funix automatically selects widgets based on the types of the arguments and returns of a function according to the type-to-widget mapping defined in a theme, e.g., bool to a checkbox. Consequently, an existing Python function can be turned into a GUI app without any code changes. As a transcompiler, Funix allows type-to-widget mappings to be defined between any Python type and any React component and its props, liberating Python developers to the frontend world without needing to know JavaScript/TypeScript. Funix further leverages features in Python or its ecosystem for building apps in a more Pythonic, intuitive, and effortless manner. With Funix, a developer can make it (a functional app) before they (competitors) fake it (in Figma or on a napkin).

Read the paper · More papers on PaperTik