from nicegui import * from bookrequest import * def pass_command() -> None: if title.value != '': result = searchBook(title.value, unattended=True) ui.notify('Searching and Downloading Book!') downloadBook(result) with ui.card().classes('absolute-center'): title = ui.input('Title').on('keydown.enter', pass_command) ui.run()