This project demonstrates a full-stack application for generating flashcards from text input. It includes a FastAPI backend to process the text and generate flashcards, and a React frontend to interact with the backend and display the generated flashcards using the react-flashcards package.
- Uses the
react-flashcardspackage for flashcard presentation - FastAPI backend to handle text input and serve generated flashcards
- Llama3 (Using Ollama) to generate flashcards from text
- React frontend to input text and display generated flashcards
- Python 3.8 or later
- Poetry for dependency management
- Ollama with llama3 (Refer: https://github.com/ollama/ollama)
-
Clone the repository:
git clone <repository_url> cd flashcard_api
-
Install dependencies:
poetry install
-
Run the FastAPI server:
poetry run uvicorn main:app --reload
- Node.js and npm
-
Navigate to the React project directory:
cd flashcard-ui -
Install dependencies:
npm install
-
Start the React development server:
npm start
-
Start the FastAPI server:
poetry run uvicorn main:app --reload
-
Start the React development server:
cd flashcard-ui npm start -
Visit
http://localhost:3000in your browser:
Enter some text and click "Generate Flashcards" to see the flashcards generated and displayed using react-flashcards.
This project is licensed under the MIT License.