Build the GUI by code in client. Add callback for realtime training