()
| 40 | |
| 41 | |
| 42 | def main(): |
| 43 | while True: |
| 44 | ui = create_ui() |
| 45 | ui.queue(concurrency_count=5, max_size=64).launch( |
| 46 | server_name="0.0.0.0" if cmd_opts.listen else None, |
| 47 | server_port=cmd_opts.port, |
| 48 | share=cmd_opts.share, |
| 49 | prevent_thread_lock=True, |
| 50 | root_path=cmd_opts.path_prefix, |
| 51 | ) |
| 52 | wait_on_server(ui) |
| 53 | print('Restarting UI...') |
| 54 | |
| 55 | |
| 56 | if __name__ == "__main__": |
no test coverage detected