ChatGPT for PDF using Gradio shows no output

Question:
hi i am trying to build a chatGPT for pdfs where you can ask the model any questions about the pdf you import and i chose to use Gradio as the UI, already written the entire code, it runs fine but after i launch the gradio app and try to test it for some reason it does not give any response and everything is just stuck in a queue and i CAN NOT FIGURE OUT WHAT THE ISSUE IS . i dont mind sharing a collaboartive link to anyone who might want to correct anything in the code and if theres anyone who has done a project similar to this can we chat a bit

Repl link:
https://replit.com/@oojore11/CHATGPT-20#main.py