Question Answer Generation App using Mistral 7B, Langchain, and FastAPI.
https://www.loom.com/share/f9a5a625d79b4f7381a54126e0b740e2?sid=98f1a0dc-f92e-4d8b-9d09-5ece38302ce7
This project is a Question-Answer Pair Generator with Zephyr-7B, which is a tool for generating questions and answers based on study materials. It utilizes the LangChain library for natural language processing tasks.
This application is developed in fast prototyping and so the frontend is first written in HTML CSS and JS then migrated to React and TSX also the backend prompt is tested on openai and then migrated to the LLM and using of LLM on free cloud platform is not easy because it gives a lot of resource limitation and doest't perform aslo there is use of streamlit for now which makes it hard to deploy it in any cloud platform .
- Navigate to the
frontend
directory in your terminal. - Run
npm install
to install the necessary dependencies. - Run
npm start
to start the development server. - Go to
http://localhost:8000/
to see you app running.
-
Navigate to the
backend
directory in your terminal. -
Ensure you have Python installed on your system.
-
Run
pip install -r requirements.txt
to install the required Python dependencies. -
Download the AI model from here and place it in the
backend
directory. -
Run
python app.py
to start the backend server. -
In case you want to test only the prompt through Open AI API run
python test_openai_app.py
start backend server of openai version of the app. -
backend server run at
http://localhost:8000
.
- After starting both the frontend and backend servers, visit
http://localhost:3000
in your web browser. - Upload a PDF file containing study material using the provided file upload input.
- Click on the "Upload" button to analyze the uploaded file.
- Once the analysis is complete, you can view and download the generated question-answer pairs.
- Python
- FastAPI
- Mistral-7B AI Model
- React
- TypeScript
- Langchain
- FAISS(similar search)
- streamlit
- ChromaDB(vector db)
- Docker
This project utilizes the LangChain library for natural language processing tasks.