{"id":17593690,"url":"https://github.com/jnlandu/mlops-project","last_synced_at":"2026-04-11T06:06:01.178Z","repository":{"id":258432044,"uuid":"873918305","full_name":"jnlandu/mlops-project","owner":"jnlandu","description":"This repository contains the updated backend codes of the repository  text-summarization, which will be merged.","archived":false,"fork":false,"pushed_at":"2024-11-24T09:36:22.000Z","size":44588,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T19:47:33.843Z","etag":null,"topics":["azure","bootstrap","fastapi","nextjs14","python","react","torchvision"],"latest_commit_sha":null,"homepage":"https://mlops-project-taupe.vercel.app/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jnlandu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-17T00:20:04.000Z","updated_at":"2024-11-24T09:36:26.000Z","dependencies_parsed_at":"2024-11-24T01:32:31.627Z","dependency_job_id":null,"html_url":"https://github.com/jnlandu/mlops-project","commit_stats":null,"previous_names":["jnlandu/mlops-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnlandu%2Fmlops-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnlandu%2Fmlops-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnlandu%2Fmlops-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnlandu%2Fmlops-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnlandu","download_url":"https://codeload.github.com/jnlandu/mlops-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246230541,"owners_count":20744349,"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":["azure","bootstrap","fastapi","nextjs14","python","react","torchvision"],"created_at":"2024-10-22T06:12:06.782Z","updated_at":"2025-12-30T23:18:12.148Z","avatar_url":"https://github.com/jnlandu.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Okapi Chat:  A text sumarization, chat and question answering web site.\n\nThis is a project that aims to provide a platform where users can upload their text or  PDF files, get a summary of the content. Additional to summarization, the user can chat with our bot. \n\nIn the later version, the user will also be to ask questions about the content.\n\nThe project leverage `Groq API`  for chat functionality, text summarization, and for question answering. The project is built using Python, FastAPI, and Docker.\n\n## Features\n- **Summarization**: Summarize the  text-like documents .\n- **Question Answering (QA)**: Perform QA ( added feature, not previously rquired in the project).\n- **Question Answering (QA)**: Perform QA  on Text or PDFs( added feature, not previously rquired in the project) is in progress.\n## Requirements\n ```txt\n    python\u003e=3.8\n    PyPDF2\n    requests\n    fastapi\n    uvicorn\n    pytest\n    groq\n    python-dotenv\n    bcrypt \n \n```\n\nInstall dependencies locally with:\n```bash\npip install -r requirements.txt\n```\n\n## Project structure\n\n```GraphQL\n.\n├── README.md\n├── backend\n│   ├── Dockerfile\n│   ├── app\n│   │   ├── __init__.py\n│   │   ├── app.py\n│   │   └── main.py\n│   ├── local.settings.json\n│   ├── mockup\n│   │   ├── SignUp.png\n│   │   ├── accountSuccessfullyCreated.png\n│   │   ├── loginlogin.png\n│   │   └── updateUserInfoConfirmation.png\n│   ├── requirements.txt\n│   ├── routers\n│   │   ├── __init__.py\n│   │   ├── auth.py\n│   │   ├── chat.py\n│   │   └── chat_history.py\n│   ├── tests\n│   │   ├── __init__.py\n│   │   ├── sample.pdf\n│   │   ├── sample.txt\n│   │   ├── test_auth.py\n│   │   ├── tpdf.py\n│   │   └── ttxt.py\n│   └── utils\n│       ├── __init__.py\n│       ├── api.py\n│       ├── auth.py\n│       ├── database.py\n│       ├── deps.py\n│       ├── models.py\n│       ├── okapi_app.db\n│       ├── pdf.py\n│       └── summarizer.py\n├── docs.md\n├── frontend\n│   ├── Dockerfile\n│   ├── README.md\n│   ├── app\n│   │   ├── admin\n│   │   │   ├── login\n│   │   │   │   └── page.js\n│   │   │   └── page.js\n│   │   ├── favicon.ico\n│   │   ├── globals.css\n│   │   ├── layout.js\n│   │   ├── login\n│   │   │   └── page.js\n│   │   ├── page.js\n│   │   ├── page.module.css\n│   │   └── register\n│   │       └── page.js\n│   ├── components\n│   │   ├── Footer.js\n│   │   ├── Header.js\n│   │   ├── ProtectedRoute.js\n│   │   └── Welcome.js\n│   ├── context\n│   │   └── AuthContext.js\n│   ├── jsconfig.json\n│   ├── next.config.mjs\n│   ├── package-lock.json\n│   ├── package.json\n│   └── tsconfig.json\n├── product\n│   └── Product design .jpg\n└── project-tree.txt\n\n16 directories, 54 files\n\n```\n    \n## Installation\nTo run the application, you need to install the required dependencies. You can install them locally or use Docker.  If you want to run it locally, here are the steps:\n\n1. Clone the repository:\n```bash\ngit clone  https://github.com/jnlandu/text-summarization.git\n```\n2. Navigate to the project directory:\n```bash\ncd text-summarization\n```\n3. Install the dependencies:\n```bash\npip install -r requirements.txt\n```\n4. Run the FastAPI application:\n```bash\nuvicorn app.main:app --reload or fastapi dev app/main.py\n```\nNote: You  will need to have the `groq` API key to run the application. You can get the API key by signing up on the [Groq API](https://groqapi.com/). Set the API key in the `.env` file, with the name `GROQ_API_KEY`, that is:\n```bash\nGROQ_API_KEY=your_api_key\n```\nEnsure that the `.env` file is in the root directory of the project, like described above. The application will be available at `http://localhost:8000`.\n\n## Usage\nOnce the application is running, you can access the FastAPI Swagger UI at `http://localhost:8000/docs`.  Here are the steps to access the full app:\n1. Authenticate the user by signing up or logging in. Click on lock icon on the top right corner of the page and Use the following credentials:\n```txt\ncredentials:\n    username: admin | user\n    password: userpass\n```\n2. Click on the \"Try it out\" button.\n3. Type or paste your text in the text area under Request body. Make user the text is enclosed in quotes.\n4. Click on the \"Execute\" button.\n5. The response will be displayed in the \"Response body\" section.\n\nNote: As mentioned earlier, the chat functionality is also available. The document-chat functionality is in progress.\n\n## Deploy your application using Docker\n- You can pull the docker image from the docker hub and run it on your local machine or server.\n- The docker image is available on the docker hub [here](https://hub.docker.com/repository/docker/jnlandu/api/general) or you can pull it using the following command:\n```bash\ndocker pull jnlandu/api:latest\n```\n- if you have cloned the repository, you can build the docker image using the following command:\n```bash\ndocker build -t your-preferred-image-name  .\n```\n- You can run the docker container using the following command:\n```bash\ndocker run -d -p 8000:8000 your-preferred-image-name\n```\n- Pass the API key as an environment variable:\n```bash\ndocker run -d -p 8000:8000 -env-file ./.env your-preferred-image-name\n```\nThe docker container will be available at `http://localhost:8000`.\n\n## Deployment with Azure\n- The project is deployed on Azure and can be accessed [here](https://okapi-chat.azurewebsites.net/docs). \n\n- CI/CD is implemented using GitHub Actions. The workflow file is available in the `.github/workflows` folder.\n\n\n## Running Tests\nThe project includes a basic testing structure within the `/tests` folder. Ensure you have the necessary dependencies installed, and run:\n```bash\npytest tests/\n```\nAs for now, only the authentication tests are available. The tests for the PDF and text files are in progress.\n\n\n## In Progress\nHere are the features that are in progress:\n- Add frontend for the web application (already built and  will be available soon).\n- The mockup for the frontend is available in the `mockup` folder.\n- The frontend mockup  and design is built using Penpot, a free and open-source design tool, and can be accessed [here](https://design.penpot.app/#/view/c04641ea-355e-80b8-8005-0470a06594c7?page-id=a2ce2100-8690-8062-8005-048c1cd45e40\u0026section=interactions\u0026frame-id=657f4724-f349-80ae-8005-060334d868a5\u0026index=0\u0026share-id=feb30645-e691-8018-8005-08062f92a59f).\n- Can play with our prototype [here](https://design.penpot.app/#/view/c04641ea-355e-80b8-8005-0470a06594c7?page-id=a2ce2100-8690-8062-8005-048c1cd45e40\u0026section=interactions\u0026frame-id=657f4724-f349-80ae-8005-060334d868a5\u0026index=0\u0026interactions-mode=show\u0026share-id=feb30645-e691-8018-8005-08062f92a59f) and give us feedback on the design and the user experience. To show interactions, click on the \"Interactions\" tab on the top right corner of the page.\n\n## Tech stack\nThe backend is built using:\n- Python\n- FastAPI\n- Docker\n- Pydantic\n- Azure Blob Storage for users' PDF files to be processed and allow users to chat with.\n- Azure PostgreSQL for the database and chat history of users\n\nThe frontend is built using:\n- HTML\n- CSS\n- JavaScript\n- Next.js 14\n- Bootsrtrap 5\n\n\n## Authors\n- [Jeremy N. Mabiala](https://jnlandu.github.io/)\n- [Atou]()\n- [Senanou ]()\n\n\n## Contributing\nContributions are welcome! For feature requests, bug reports, or questions, please open an issue.\n\n\n## Acknowledgements\n- [Groq API](https://groqapi.com/)\n- [FastAPI Documentation](https://fastapi.tiangolo.com/)\n- [Hugging Face Transformers](https://huggingface.co/transformers/)\n- [PyPDF2 Documentation](https://pypdf2.readthedocs.io/en/latest/)\n- [Azure Documentation](https://docs.microsoft.com/en-us/azure/)\n- [Docker Documentation](https://docs.docker.com/)\n- [Next.js Documentation](https://nextjs.org/docs)\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnlandu%2Fmlops-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnlandu%2Fmlops-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnlandu%2Fmlops-project/lists"}