Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,79 +6,53 @@ colorFrom: indigo
|
|
| 6 |
colorTo: purple
|
| 7 |
sdk_version: 1.46.0
|
| 8 |
---
|
| 9 |
-
# π¦ BatAnki β AI Flashcard
|
| 10 |
|
| 11 |
-
BatAnki is an AI-powered flashcard
|
| 12 |
|
| 13 |
---
|
| 14 |
|
| 15 |
-
## β
Features
|
| 16 |
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
- πΎ Export to
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
|
| 26 |
-
---
|
| 27 |
-
|
| 28 |
-
## π Deployment (Hugging Face)
|
| 29 |
-
|
| 30 |
-
### Step 1: Create Space
|
| 31 |
-
|
| 32 |
-
1. Go to: [https://huggingface.co/spaces](https://huggingface.co/spaces)
|
| 33 |
-
2. Click **Create new Space**
|
| 34 |
-
3. Name it something like `batanki-app`
|
| 35 |
-
4. Choose **"Streamlit"**
|
| 36 |
-
5. Choose **"Public"** (or Private if you have Pro)
|
| 37 |
-
|
| 38 |
-
---
|
| 39 |
-
|
| 40 |
-
### Step 2: Upload Files
|
| 41 |
-
|
| 42 |
-
Upload the following into your Space:
|
| 43 |
-
- `app.py`
|
| 44 |
-
- `config.py`
|
| 45 |
-
- `requirements.txt`
|
| 46 |
-
- (Optional) `README.md`
|
| 47 |
|
| 48 |
---
|
| 49 |
|
| 50 |
-
###
|
| 51 |
-
|
| 52 |
-
-
|
| 53 |
-
-
|
| 54 |
-
-
|
| 55 |
-
|
| 56 |
-
---
|
| 57 |
-
|
| 58 |
-
## π§ Model Details
|
| 59 |
-
|
| 60 |
-
- Flashcard AI: `t5-base` (can be swapped with `BioGPT` or `medalpaca` for more clinical reasoning)
|
| 61 |
-
- OCR: `PyMuPDF` + `pytesseract` + `easyocr`
|
| 62 |
-
- Audio: `openai/whisper` (base model)
|
| 63 |
|
| 64 |
---
|
| 65 |
|
| 66 |
-
##
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
## π‘ Notes
|
| 74 |
-
|
| 75 |
-
- No external API needed
|
| 76 |
-
- Fully runs within Hugging Face (free tier)
|
| 77 |
-
- No login/save yet (you can add SQLite/Firestore later)
|
| 78 |
|
| 79 |
---
|
| 80 |
|
| 81 |
-
##
|
| 82 |
|
| 83 |
-
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
colorTo: purple
|
| 7 |
sdk_version: 1.46.0
|
| 8 |
---
|
| 9 |
+
# π¦ BatAnki β AI Flashcard Engine for PDF / Image / Audio / YouTube / Text
|
| 10 |
|
| 11 |
+
BatAnki is an offline, fully open-source, AI-powered flashcard app designed for students, medicos, and power learners. Built for Hugging Face Spaces, no API keys required.
|
| 12 |
|
| 13 |
---
|
| 14 |
|
| 15 |
+
### β
Features (All Green Table Items Supported)
|
| 16 |
+
- π Upload & process **PDF, Image, Audio, YouTube, Text (.txt/.docx)**
|
| 17 |
+
- π Extract text using **OCR**, **Whisper**, or **PyMuPDF**
|
| 18 |
+
- π§ Generate flashcards using **T5** or **BioGPT**
|
| 19 |
+
- π‘ Supports **Q&A, Cloze, MCQ, and Reverse cards**
|
| 20 |
+
- π·οΈ Tag flashcards manually
|
| 21 |
+
- πΎ Export to **Anki (.apkg)** and **CSV**
|
| 22 |
+
- π§Ύ Inline preview & edit of each card
|
| 23 |
+
- π¨ Light/Dark themes with Batman-style layout
|
| 24 |
+
- βοΈ 100% deployable without any paid APIs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
---
|
| 27 |
|
| 28 |
+
### π§ Models Used
|
| 29 |
+
- `t5-base` (general QA generation)
|
| 30 |
+
- `microsoft/BioGPT` (medical/scientific Q&A)
|
| 31 |
+
- `openai/whisper` (audio transcription)
|
| 32 |
+
- `easyocr` + `pytesseract` (OCR engine)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
---
|
| 35 |
|
| 36 |
+
### π» Usage Instructions
|
| 37 |
+
1. π Upload a file (PDF, Image, Audio, Text) or paste a YouTube link
|
| 38 |
+
2. π― Choose the card types you want (Q&A, Cloze, MCQ, Reverse)
|
| 39 |
+
3. π Click **Extract Text**, then **Generate Flashcards**
|
| 40 |
+
4. βοΈ Edit, tag, and preview each card
|
| 41 |
+
5. β¬οΈ Export as `.apkg` or `.csv`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
---
|
| 44 |
|
| 45 |
+
### π Requirements
|
| 46 |
|
| 47 |
+
```bash
|
| 48 |
+
streamlit
|
| 49 |
+
transformers
|
| 50 |
+
torch
|
| 51 |
+
genanki
|
| 52 |
+
easyocr
|
| 53 |
+
PyMuPDF
|
| 54 |
+
pytesseract
|
| 55 |
+
whisper
|
| 56 |
+
yt-dlp
|
| 57 |
+
python-docx
|
| 58 |
+
Pillow
|