File size: 1,585 Bytes
c21a510
9dbcde0
c21a510
 
 
 
 
 
 
48d9af7
881300d
 
 
48d9af7
881300d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48d9af7
881300d
 
 
 
c4eb0c2
c21a510
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: AI Notebook Tutor
emoji: πŸ“–
colorFrom: pink
colorTo: yellow
sdk: docker
pinned: false
---

# AI-Notebook-Tutor

# RAG Application for QA in Jupyter Notebook

AI-Notebook-Tutor is designed to provide question-answering capabilities in a Jupyter Notebook using the Retrieval Augmented Generation (RAG) model. It's built on top of the LangChain and Chainlit platforms, and it uses the OpenAI API for the chat model.

## Features

- Document processing: Load a Jupyter notebook and split it into chunks for processing.
- Query answering: Use the RAG model to answer queries based on the processed document.
- User interaction: Interact with the application through a chat interface.

## Setup

1. Clone the repository.
2. Install the required dependencies using pip:

```bash
pip install -r requirements.txt
```

3. Create a .env file and add you environment variables. You'll need to provide your OpenAI API key in the format:

```bash
OPENAI_API_KEY=your-key-here
```

4. Run the application using the following command:

```bash
chainlit run notebook_tutor/app.py
```

## Usage

Start a chat session and upload a Jupyter notebook file. The application will process the document and you can then ask questions related to the content of the notebook. It might take some time to answer some question (should be less than 1 min), so please be patient.

## Acknowledgements

This project uses technologies including LangChain, OpenAI's GPT models, Qdrant for vector storage and ChainLit. Thanks to all open-source contributors and organizations that make these tools available.