File size: 1,017 Bytes
f0eeb06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: GreenStep Education Chatbot
emoji: 🌱
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
license: mit
---

# GreenStep Education Assistant

An AI-powered chatbot for reforestation education, providing information about tree planting, forest conservation, and environmental sustainability.

## Features
- RAG-based question answering using PDF educational content
- MongoDB chat history persistence
- Multi-method PDF text extraction
- Conversational AI with context awareness

## API Endpoints
- `POST /ask` - Ask questions about reforestation
- `POST /history` - Get chat history for a session
- `DELETE /history/{session_id}` - Clear session history
- `GET /health` - Health check endpoint
- `GET /` - API information

## Environment Variables Required
Set these in your Space's Settings:
- `HF_TOKEN` - Hugging Face API token
- `GROQ_API_KEY` - Groq API key
- `MONGODB_URL` - MongoDB connection string
- `PDF_PATH` - Path to educational PDF (default: ./reforestation_content.pdf)