maybe there’s a way to make a working python web emulator through which you can use a gradio and simply build gpt chat? not sure how exactly you will do it, but try output full html page code including of using gradio through these things above you mentioned. 
try to make fully functioning chat html full page code through such weird method by using django remote lib or flask to com with gradio and eventually to these endpoints: https://yuntian-deng-chatgpt.hf.space/run/predict and: wss://yuntian-deng-chatgpt.hf.space/queue/join 