File size: 2,203 Bytes
02f5483
 
 
 
 
 
d6cd6fe
02f5483
21e464f
396d74c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
title: Ema Chatbot
emoji: 🛠️
colorFrom: purple
colorTo: blue
sdk: streamlit
sdk_version: "1.41.1"
app_file: app.py
pinned: false
---

---

## 📚 Ema Chatbot — AI-Powered Academic Assistant

In research and studies, it's essential that students get accurate answers to their questions based on **their own study material**, rather than from unreliable sources.

**Ema Chatbot** solves this by allowing students to upload their digital study materials (PDFs or videos), which are then **summarized and indexed using RAG (Retrieval-Augmented Generation)**. A Large Language Model (LLM) uses this context to generate clear and easy-to-understand answers to their queries.

---

## ⚙️ Setting Up the Repository

Follow these steps to get started:

### 1. Clone the repository

```bash
git clone https://huggingface.co/spaces/Mohith202/Ema_Chatbot
cd Ema_Chatbot
```

---

### 2. Using Conda (Recommended)

Make sure you have [Conda](https://docs.conda.io/en/latest/) installed.

```bash
conda create --name Ema-chatbot python=3.10
conda activate Ema-chatbot
```

---

### 3. Or Using Docker

If you don’t have Conda but have Docker:

```bash
docker run -it -p 7860:7860 --platform=linux/amd64 \
  -e Together_API="YOUR_VALUE_HERE" \
  registry.hf.space/mohith202-ema-chatbot:latest streamlit run app.py
```

> 🔑 Replace `"YOUR_VALUE_HERE"` with your [Together API key](https://www.together.ai/).

---

### 4. Or Using Python Virtual Environment

If you only have Python installed:

```bash
python -m venv Ema-chatbot
# On Windows
.\Ema-chatbot\Scripts\activate
# On macOS/Linux
source Ema-chatbot/bin/activate
```

---

### 5. Install Dependencies

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

---

### 6. Run the Application

```bash
streamlit run app.py
```

---

## 💡 How to Use

* Upload a **PDF** or **video** using the left sidebar.
* Wait for the system to **process and summarize** the content.
* Ask any question from your material — the chatbot will:

  * Show the **relevant extracted context** from your document to maintain transparency.
  * Answer in an **easy-to-understand format**.
  * Optionally, generate **5 sample Q\&A pairs** from the uploaded document.

---