Please write python code for a web application using flask. The app should have a user inetrface for uploading DOCX and PDF documents and to display a list of already uploaded documents. The user interface should also implement components needed for a chat functionality. Provide two versions of response separated with exactly 6 asterisk symbols: ******.
user