Its is a simple application to perfomr QnA on providing a pdf file.
The application follows these steps to provide responses to your questions:
-
PDF Loading: The app reads multiple PDF documents and extracts their text content.
-
Text Chunking: The extracted text is divided into smaller chunks that can be processed effectively.
-
Language Model: The application utilizes a language model to generate vector representations (embeddings) of the text chunks.
-
Similarity Matching: When you ask a question, the app compares it with the text chunks and identifies the most semantically similar ones.
-
Response Generation: The selected chunks are passed to the language model, which generates a response based on the relevant content of the PDFs.
-
/file [POST] Get the file as an input and extract the text data and loads into the model.
-
/default_csv [GET] Loads the default CSV by taking filename as query parameter.
-
/ask_question [POST] Takes question as an input and input question into ML model and return ML models output as an answer(result).
-
Handling file upload was a major problem I have faced.
-
Designing column in order to separate file upload and chat separatley.
-
API's integrations.
-
I could have made better error handling
-
Made a better desing and flow, something like auto scroll
-
Focused on local storage of keys values.