Spaces:
Runtime error
title: Document Viewer with Flashcard Generation
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
sdk_version: '3.9'
app_file: app.py
pinned: false
Document Viewer with Flashcard Generation: AI-Powered Study Companion
Elevate your learning experience with our AI-driven document viewer and flashcard generator! This web application transforms your PDFs, TXT files, and EPUBs into interactive flashcards and explanations using Claude AI, perfect for importing into Anki. Ideal for students, researchers, and lifelong learners looking to enhance their study sessions and spaced repetition practice.
Key Features:
- π Upload and view PDFs, TXT files, and EPUBs directly in your browser
- π€ Generate flashcards and explanations with Claude AI
- π Language learning mode for vocabulary acquisition
- ποΈ Highlight important text for focused learning
- πΎ Save and export your flashcard collections to Anki-compatible format
- π± Responsive design for desktop and mobile use
- π Seamless integration with Anki for optimized spaced repetition
Dive into your documents, emerge with knowledge at your fingertips, and supercharge your Anki decks!
Getting Started
Prerequisites
- Docker
- Anthropic API key
Installation
Clone the repository:
git clone https://github.com/your-username/document-viewer-flashcard-generator.git cd document-viewer-flashcard-generator
Build the Docker image:
docker build -t document-viewer-flashcard-generator .
Run the Docker container:
docker run -p 7860:7860 document-viewer-flashcard-generator
Open your web browser and navigate to
http://localhost:7860
Usage
- Upload a PDF, TXT, or EPUB file using the file input at the top of the page
- Navigate through the document using the page controls or by scrolling
- Select text in the document viewer
- Choose a mode (Flashcard, Explain, or Language) and click "Generate" to create content from the selected text
- For language mode, double-click a word to generate a flashcard
- View, remove, or export generated flashcards
- Use the highlight mode (Alt+Select) to mark important text in the document
API Key Setup
This application requires a Claude API key to function:
- Sign up for an API key at https://www.anthropic.com
- In the application, click the gear icon to open the settings panel
- Enter your API key in the provided input field
Deployment on HuggingFace Spaces
This application is designed to be easily deployed on HuggingFace Spaces:
- Fork this repository to your GitHub account
- Create a new Space on HuggingFace and choose "Docker" as the SDK
- Connect your GitHub repository to the HuggingFace Space
- HuggingFace will automatically build and deploy your Docker container
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For discussing improvements or new features, we encourage you to open an Issue first to facilitate community discussion.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- PDF.js for PDF rendering
- ePub.js for EPUB rendering
- Anthropic for the Claude AI API
- Flask for the web framework
- Docker for containerization
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference for more information on HuggingFace Spaces configuration.[# PDF Flashcard Generator: AI Study CompanionUnlock the power of your PDFs with AI-driven learning! This web application transforms your documents into interactive flashcards and explanations using Claude AI, perfect for importing into **ANKI**. Ideal for students, researchers, and lifelong learners looking to supercharge their study sessions and spaced repetition practice.## Key Features:- π Upload and view PDFs directly in your browser- π€ Generate flashcards and explanations with Claude AI- ποΈ Highlight important text for focused learning- πΎ Save and export your flashcard collections to ANKI-compatible format- π± Responsive design for desktop and mobile use- π Seamless integration with ANKI for optimized spaced repetitionDive into your documents, emerge with knowledge at your fingertips, and supercharge your ANKI decks!## Getting Started### Prerequisites- Python 3.7+- Flask- Anthropic API key### Installation1. Clone the repository: git clone https://github.com/quocdat-le-insacvl/pdf-flashcards-autogen.git cd pdf-flashcards-autogen
2. Install the required packages: pip install -r requirements.txt
3. Set up your Anthropic API key: - Sign up for an API key at https://www.anthropic.com - Add your API key to the application when prompted### Running the Application1. Start the Flask server: python app.py
2. Open your web browser and navigate to http://localhost:5000
## Usage1. Upload a PDF file using the file input at the top of the page2. Navigate through the PDF using the page controls or by scrolling3. Select text in the PDF viewer4. Click "Generate Flashcard" to create flashcards from the selected text5. View, remove, or export generated flashcards6. Use the highlight mode to mark important text in the PDF## ContributingContributions are welcome! Please feel free to submit a Pull Request. For discussing improvements or new features, we encourage you to open an Issue first to facilitate community discussion.## LicenseThis project is licensed under the MIT License - see the LICENSE file for details.## Acknowledgments- PDF.js for PDF rendering- Anthropic for the Claude AI API](# PDF Flashcard Generator: AI Study CompanionUnlock the power of your PDFs with AI-driven learning! This web application transforms your documents into interactive flashcards and explanations using Claude AI, perfect for importing into ANKI. Ideal for students, researchers, and lifelong learners looking to supercharge their study sessions and spaced repetition practice.## Key Features:- π Upload and view PDFs directly in your browser- π€ Generate flashcards and explanations with Claude AI- ποΈ Highlight important text for focused learning- πΎ Save and export your flashcard collections to ANKI-compatible format- π± Responsive design for desktop and mobile use- π Seamless integration with ANKI for optimized spaced repetitionDive into your documents, emerge with knowledge at your fingertips, and supercharge your ANKI decks!## Getting Started### Prerequisites- Python 3.7+- Flask- Anthropic API key### Installation1. Clone the repository: git clone https://github.com/quocdat-le-insacvl/pdf-flashcards-autogen.git cd pdf-flashcards-autogen
2. Install the required packages: pip install -r requirements.txt
3. Set up your Anthropic API key: - Sign up for an API key at https://www.anthropic.com - Add your API key to the application when prompted### Running the Application1. Start the Flask server: python app.py
2. Open your web browser and navigate to http://localhost:5000
## Usage1. Upload a PDF file using the file input at the top of the page2. Navigate through the PDF using the page controls or by scrolling3. Select text in the PDF viewer4. Click "Generate Flashcard" to create flashcards from the selected text5. View, remove, or export generated flashcards6. Use the highlight mode to mark important text in the PDF## ContributingContributions are welcome! Please feel free to submit a Pull Request. For discussing improvements or new features, we encourage you to open an Issue first to facilitate community discussion.## LicenseThis project is licensed under the MIT License - see the LICENSE file for details.## Acknowledgments- PDF.js for PDF rendering- Anthropic for the Claude AI API)
Unlock the power of your PDFs with AI-driven learning! This web application transforms your documents into interactive flashcards and explanations using Claude AI, perfect for importing into ANKI. Ideal for students, researchers, and lifelong learners looking to supercharge their study sessions and spaced repetition practice.
Key Features:
- π Upload and view PDFs directly in your browser
- π€ Generate flashcards and explanations with Claude AI
- ποΈ Highlight important text for focused learning
- πΎ Save and export your flashcard collections to ANKI-compatible format
- π± Responsive design for desktop and mobile use
- π Seamless integration with ANKI for optimized spaced repetition
Dive into your documents, emerge with knowledge at your fingertips, and supercharge your ANKI decks!
Getting Started
Prerequisites
- Python 3.7+
- Flask
- Anthropic API key
Installation
Clone the repository:
git clone https://github.com/quocdat-le-insacvl/pdf-flashcards-autogen.git cd pdf-flashcards-autogen
Install the required packages:
pip install -r requirements.txt
Set up your Anthropic API key:
- Sign up for an API key at https://www.anthropic.com
- Add your API key to the application when prompted
Running the Application
Start the Flask server:
python app.py
Open your web browser and navigate to
http://localhost:5000
Usage
- Upload a PDF file using the file input at the top of the page
- Navigate through the PDF using the page controls or by scrolling
- Select text in the PDF viewer
- Click "Generate Flashcard" to create flashcards from the selected text
- View, remove, or export generated flashcards
- Use the highlight mode to mark important text in the PDF
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For discussing improvements or new features, we encourage you to open an Issue first to facilitate community discussion.
License
This project is licensed under the MIT License - see the LICENSE file for details.