{"id":27326532,"url":"https://github.com/humanpose1/automatic_flashcard_for_arabic","last_synced_at":"2025-07-12T04:33:51.437Z","repository":{"id":286196233,"uuid":"960680555","full_name":"humanpose1/automatic_flashcard_for_arabic","owner":"humanpose1","description":"A simple python script using langchain + genanki to create flashcard to learn arabic","archived":false,"fork":false,"pushed_at":"2025-04-04T22:31:37.000Z","size":220,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T11:51:43.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanpose1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-04T21:29:16.000Z","updated_at":"2025-04-04T22:31:41.000Z","dependencies_parsed_at":"2025-04-04T22:39:23.409Z","dependency_job_id":null,"html_url":"https://github.com/humanpose1/automatic_flashcard_for_arabic","commit_stats":null,"previous_names":["humanpose1/automatic_flashcard_for_arabic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/humanpose1/automatic_flashcard_for_arabic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanpose1%2Fautomatic_flashcard_for_arabic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanpose1%2Fautomatic_flashcard_for_arabic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanpose1%2Fautomatic_flashcard_for_arabic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanpose1%2Fautomatic_flashcard_for_arabic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanpose1","download_url":"https://codeload.github.com/humanpose1/automatic_flashcard_for_arabic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanpose1%2Fautomatic_flashcard_for_arabic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264939002,"owners_count":23686203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-12T11:42:46.649Z","updated_at":"2025-07-12T04:33:51.370Z","avatar_url":"https://github.com/humanpose1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create flashcards automatically with AI.\n\nWe use uv to manage dependancy.\n\nuse the right version of python\n```bash\nuv venv --python 3.13\n```\n\nWe installed everything like this:\n\n```bash\nuv add ipykernel ipython torch torchvision numpy matplotlib playwright langchain-core langchain-groq langchain beautifulsoup4 genanki pydub transformers nest_asyncio \n```\n\nThe `uv.lock` and `pyproject.toml` is here you can download as:\n```bash\nuv sync --locked\n```\n\ninstall firefox and chrome with playwright\n```bash\nuv run playwright install chrome firefox\n```\n\n\nWe scrape media arabic sentence from [aljazeera learning platform](https://learning.aljazeera.net/en):\n```bash\nuv run python scrape_arabic_text.py -o out/article_all.json\n```\n\n\nThen to compute flashcard using llm you can use:\n\n```bash\nuv run python automatic_translation_all.py -i out/article_all.json -o out/article_all_with_llm.json\n```\n\nThe model runs locally using QWen2.5 72B. If you want a faster model you can use Groq (by default it uses mistral-saba-24b)\n\nYou can find an diagram of the workflow to create the flashcard. It is a very simple workflow.\n![Image](./graph.png)\n\n\n```bash\nuv run python automatic_translation_all.py -i out/article_all.json -o out/article_all_with_llm.json --use-groq\n```\n\nDo not forget to export\n```bash\nexport GROQ_API_KEY=XXX\n```\n\n\n\nThen to create flashcard: use:\n```bash\nuv run python create_anki_flashcard.py -i out/articles_all_with_llm.json -o out/test.apkg --title FlashCard_Aljazeera_Learning\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanpose1%2Fautomatic_flashcard_for_arabic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanpose1%2Fautomatic_flashcard_for_arabic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanpose1%2Fautomatic_flashcard_for_arabic/lists"}