updated README.md
This commit is contained in:
parent
c3ca249877
commit
61827b4e11
24
README.md
24
README.md
|
@ -4,6 +4,7 @@ A comprehensive toolkit that offers:
|
|||
- Conversion of CSV files into Anki deck packages (.apkg files).
|
||||
- Conversion of image files in a directory to a text file using Optical Character Recognition (OCR).
|
||||
- Generation of CSV format question-answer pairs from textual content using OpenAI's GPT-3 model.
|
||||
- **RESTful API endpoint to upload and convert multiple images directly into an Anki deck package.**
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -12,6 +13,7 @@ A comprehensive toolkit that offers:
|
|||
- Generates CSV formatted question-answer pairs based on a given text content, ideal for studying or summarization.
|
||||
- For CSV: there are only two columns in the CSV file, separated by the first comma encountered.
|
||||
- CSV files should have a "Front" column for questions and a "Back" column for answers.
|
||||
- **API endpoint that accepts multiple image uploads, processes them through the pipeline, and returns an Anki deck package.**
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -31,6 +33,7 @@ A comprehensive toolkit that offers:
|
|||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Before using the `text2csvdeck.py` script, ensure that you have set the `OPENAI_API_KEY` environment variable:
|
||||
|
@ -43,6 +46,27 @@ Remember to replace `your_openai_api_key_here` with your actual OpenAI API key.
|
|||
|
||||
## Usage
|
||||
|
||||
### **REST API Usage**
|
||||
|
||||
To start the server:
|
||||
```bash
|
||||
python server.py
|
||||
```
|
||||
|
||||
#### Endpoint: `/generate-deck`
|
||||
|
||||
**Method**: POST
|
||||
|
||||
**Description**: Accepts multiple image uploads, processes them through the pipeline, and returns an Anki deck package.
|
||||
|
||||
**Body**:
|
||||
|
||||
- form-data with key `image` and multiple image files as values.
|
||||
|
||||
**Response**:
|
||||
|
||||
- An `output.apkg` file ready for import into Anki.
|
||||
|
||||
### Pipeline Usage
|
||||
|
||||
To convert a directory of images directly to an Anki deck package:
|
||||
|
|
Loading…
Reference in New Issue
Block a user