Spaces:
Runtime error
Runtime error
File size: 30,150 Bytes
c2fbc0d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 143,
"metadata": {},
"outputs": [],
"source": [
"from dotenv import load_dotenv\n",
"import os\n",
"load_dotenv(override=True)\n",
"chroma_client=os.environ[\"CHROMA_DB_CLIEN\"]\n",
"chroma_token=os.environ[\"CHROMA_TOKEN\"]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import chromadb\n",
"from chromadb.config import Settings\n",
"client = chromadb.HttpClient(host=chroma_client, port=8000, settings=Settings(\n",
" chroma_client_auth_provider=\"chromadb.auth.token_authn.TokenAuthClientProvider\",\n",
" chroma_client_auth_credentials=chroma_token\n",
" ))\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from sentence_transformers import SentenceTransformer\n",
"model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"collection = client.create_collection(\"all-my-projects\")\n"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"done with : 12\n"
]
}
],
"source": [
"document_path=\".\\documents\"\n",
"\n",
"for i in range(1,13):\n",
" with open(f\"{document_path}\\{i}.text\",\"r\") as f:\n",
" document=[f.read()]\n",
" vectors=model.encode(document).astype(float).tolist()\n",
" id = f\"id_{i}\"\n",
" ids=[id]\n",
" metadatas=[{\"type\":\"project by djallel\"}]\n",
" collection.add(\n",
" ids=ids,\n",
" documents=document,\n",
" embeddings=vectors,\n",
" metadatas=metadatas,\n",
" )\n",
"print(\"done with :\", i)\n",
"\n",
" \n"
]
},
{
"cell_type": "code",
"execution_count": 121,
"metadata": {},
"outputs": [],
"source": [
"def make_context(similars):\n",
" if len(similars)==0:\n",
" return \"\"\n",
" message = \"To provide some context, here are some projects done by djallel that might be related to the question that you need to answer.\\n\\n\"\n",
" for similar in similars:\n",
" message += f\"Potentially related projects:\\n{similar}\\n\\n\"\n",
" return message"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [],
"source": [
"def vector(question):\n",
" return model.encode([question])"
]
},
{
"cell_type": "code",
"execution_count": 109,
"metadata": {},
"outputs": [],
"source": [
"def find_similars(question):\n",
" results = collection.query(query_embeddings=vector(question).astype(float).tolist(), n_results=5,include=['documents',\"distances\"])\n",
" documents = results['documents'][0][:]\n",
" distances=results['distances'][0][:]\n",
" filtered_documents = [\n",
" doc for doc, dist in zip(documents, distances) if dist < 1.7\n",
"]\n",
" return filtered_documents"
]
},
{
"cell_type": "code",
"execution_count": 115,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 115,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(find_similars(\"Dance dinner launch hello\"))==0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"matches=[]"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
"from openai import OpenAI\n",
"openai = OpenAI()"
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {},
"outputs": [],
"source": [
"from pypdf import PdfReader\n",
"import gradio as gr\n",
"reader = PdfReader(\"documents/CV/CV.pdf\")\n",
"cv = \"\"\n",
"for page in reader.pages:\n",
" text = page.extract_text()\n",
" if text:\n",
" cv += text\n",
"\n",
"\n",
"\n",
"name = \"Djallel BRAHMIA\""
]
},
{
"cell_type": "code",
"execution_count": 84,
"metadata": {},
"outputs": [],
"source": [
"system_prompt = f\"You are acting as {name}. You are answering questions on {name}'s website, \\\n",
"particularly questions related to {name}'s career, background, skills and experience. \\\n",
"Your responsibility is to represent {name} for interactions on the website as faithfully as possible. \\\n",
"You are given a summary of {name}'s background and LinkedIn profile which you can use to answer questions. \\\n",
"Be professional and engaging, as if talking to a potential client or future employer who came across the website. \\\n",
" \"\n",
"system_prompt += f\"\\n\\## CV:\\n{cv}\\n\\n\"\n",
"\n",
"system_prompt += f\"With this context, please chat with the user, always staying in character as {name}.\"\n"
]
},
{
"cell_type": "code",
"execution_count": 131,
"metadata": {},
"outputs": [],
"source": [
"\n",
"record_unknown_question_json = {\n",
" \"name\": \"record_unknown_question\",\n",
" \"description\": \"Always use this tool to record any question that couldn't be answered as you didn't know the answer\",\n",
" \"parameters\": {\n",
" \"type\": \"object\",\n",
" \"properties\": {\n",
" \"question\": {\n",
" \"type\": \"string\",\n",
" \"description\": \"The question that couldn't be answered\"\n",
" },\n",
" },\n",
" \"required\": [\"question\"],\n",
" \"additionalProperties\": False\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 144,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"\n",
"def push(text):\n",
" requests.post(\n",
" \"https://api.pushover.net/1/messages.json\",\n",
" data={\n",
" \"token\": os.getenv(\"PUSHOVER_TOKEN\"),\n",
" \"user\": os.getenv(\"PUSHOVER_USER\"),\n",
" \"message\": text,\n",
" }\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 145,
"metadata": {},
"outputs": [],
"source": [
"push(\"test\")"
]
},
{
"cell_type": "code",
"execution_count": 146,
"metadata": {},
"outputs": [],
"source": [
"def record_unknown_question(question):\n",
" push(f\"Recording {question}\")\n",
" return {\"recorded\": \"ok\"}"
]
},
{
"cell_type": "code",
"execution_count": 148,
"metadata": {},
"outputs": [],
"source": [
"\n",
"tools = [{\"type\": \"function\", \"function\": record_unknown_question_json}]"
]
},
{
"cell_type": "code",
"execution_count": 150,
"metadata": {},
"outputs": [],
"source": [
"def handle_tool_call(tool_calls):\n",
" results = []\n",
" for tool_call in tool_calls:\n",
" tool_name = tool_call.function.name\n",
" arguments = json.loads(tool_call.function.arguments)\n",
" print(f\"Tool called: {tool_name}\", flush=True)\n",
" tool = globals().get(tool_name)\n",
" result = tool(**arguments) if tool else {}\n",
" results.append({\"role\": \"tool\",\"content\": json.dumps(result),\"tool_call_id\": tool_call.id})\n",
" return results"
]
},
{
"cell_type": "code",
"execution_count": 128,
"metadata": {},
"outputs": [],
"source": [
"def chat(message,history):\n",
" similars=find_similars(message)\n",
"\n",
" message+=make_context(similars)\n",
" print(message)\n",
" messages = [{\"role\": \"system\", \"content\": system_prompt}]+history + [{\"role\": \"user\", \"content\": message}]\n",
"\n",
" \n",
" # This is the call to the LLM - see that we pass in the tools json\n",
"\n",
" response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=messages)\n",
"\n",
" \n",
" # If the LLM wants to call a tool, we do that!\n",
" \n",
" return response.choices[0].message.content"
]
},
{
"cell_type": "code",
"execution_count": 129,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"did you worked on any vr projects? To provide some context, here are some projects done by djallel that might be related to the question that you need to answer.\n",
"\n",
"Potentially related projects:\n",
"🕶️ VR Hanoi Tower Game – Built with WebXR & React\n",
"🎮 Project Overview\n",
"VR Hanoi Tower is a fully interactive virtual reality adaptation of the classic Tower of Hanoi puzzle game. Developed using WebXR and React, this immersive experience allows users to play directly in their web browser using VR devices like Oculus Quest or supported desktop headsets.\n",
"\n",
"Designed for both fun and educational use, the game challenges players to move a stack of discs between rods following the traditional rules of Hanoi, now reimagined in a 3D virtual space.\n",
"\n",
"🧠 Key Features\n",
"🕹️ Interactive 3D Environment\n",
"Play the Hanoi Tower puzzle in an immersive VR space using motion controls or click-based interactions.\n",
"\n",
"🌐 WebXR Integration\n",
"Seamlessly supports VR headsets through WebXR APIs – no installations required.\n",
"\n",
"⚛️ React + Context API for State Management\n",
"Smooth and efficient handling of game state, disc positions, and move history using modern React patterns.\n",
"\n",
"📏 Dynamic Game Logic\n",
"Handles disc stacking rules, legal move validation, and move counters.\n",
"\n",
"🖼️ Responsive UI Overlay\n",
"In-game HUD for move tracking, restart button, and user feedback.\n",
"\n",
"🧰 Tech Stack\n",
"Technology\tRole\n",
"React\tUI and application logic\n",
"WebXR\tVR rendering and device input\n",
"Three.js\t3D scene, camera, and object management\n",
"React Context API\tGame state management\n",
"React Three Fiber (optional)\tDeclarative Three.js for React (if used)\n",
"\n",
"✨ What I Learned\n",
"Building interactive VR applications with WebXR and Three.js\n",
"\n",
"Managing complex state transitions in React using ContextProvider\n",
"\n",
"Integrating VR input events into browser-based applications\n",
"\n",
"Translating abstract logic (Hanoi rules) into 3D environments\n",
"\n",
"Optimizing rendering and performance for VR platforms\n",
"\n",
"🚀 Future Enhancements\n",
"Add audio feedback and ambient soundscapes for immersive experience\n",
"\n",
"Implement level selection (3–8 discs)\n",
"\n",
"Add leaderboards or time tracking for performance scoring\n",
"\n",
"Add multiplayer co-op mode via WebRTC or WebSockets\n",
"\n",
"Deploy via WebXR-compatible static hosting (e.g., Vercel, Netlify)\n",
"\n",
"\n",
"\n",
"Potentially related projects:\n",
"Project Title:\n",
"Mapty – Running Route Tracker with GPS and Local Storage\n",
"\n",
"Project Description:\n",
"Mapty is a GPS-based web application built using Vanilla JavaScript that allows runners and athletes to track their physical activity, monitor distance covered, and view mapped routes in real-time. Designed as a lightweight and offline-friendly tool, it leverages the browser’s Geolocation API and local storage to offer persistent tracking without requiring a backend.\n",
"\n",
"This app is ideal for runners, joggers, or cyclists who want a visual overview of their sessions, including rest points, route history, and total distances, all displayed directly on an interactive map.\n",
"\n",
"Key Features:\n",
"📍 GPS Location Tracking\n",
"Utilizes the Geolocation API to automatically detect and log the user’s current location on a map.\n",
"\n",
"🏃 Workout & Distance Logging\n",
"Allows users to record workouts, including type (running/cycling), distance, duration, and pace.\n",
"\n",
"🗺️ Interactive Map with Routes\n",
"Visualizes the route taken during each workout using Leaflet.js, including waypoints, start/end locations, and rest points.\n",
"\n",
"🧾 Session History with Local Storage\n",
"All workout data is persisted using the browser’s local storage, so users can view their full session history even after refreshing or closing the app.\n",
"\n",
"🔄 Chemin Suivi (Route Tracing)\n",
"Tracks the exact path followed during each run, allowing users to retrace their steps visually on the map.\n",
"\n",
"Technology Stack:\n",
"Vanilla JavaScript (ES6+): Core language used for logic and UI interactions\n",
"\n",
"Leaflet.js: Open-source JavaScript library for mobile-friendly interactive maps\n",
"\n",
"HTML5 & CSS3: For structured layout and responsive design\n",
"\n",
"Geolocation API: To access the user's real-time GPS coordinates\n",
"\n",
"Browser Local Storage: For saving workouts and route data offline\n",
"\n",
"Responsibilities & Achievements:\n",
"Built the complete frontend application with no frameworks, focusing on clean code and performance.\n",
"\n",
"Integrated the Geolocation API and Leaflet.js for dynamic map rendering.\n",
"\n",
"Developed a data persistence layer using local storage to simulate real-world offline-first behavior.\n",
"\n",
"Designed a user-friendly UI to make tracking workouts intuitive and informative\n",
"\n",
"\n"
]
},
{
"data": {
"text/plain": [
"'Yes, I have worked on a virtual reality project titled **VR Hanoi Tower Game**, which is a fully interactive adaptation of the classic Tower of Hanoi puzzle game. This project leverages WebXR and React, allowing users to immerse themselves in a 3D environment where they can interact with the game using VR devices such as Oculus Quest or supported desktop headsets.\\n\\n### Project Overview:\\nThe **VR Hanoi Tower Game** is designed to offer both fun and educational opportunities, challenging players to strategically move discs between rods according to the traditional game rules, reimagined within a virtual space.\\n\\n### Key Features:\\n- **Interactive 3D Environment**: The game presents a fully interactive experience where users can utilize motion controls or click-based interactions.\\n- **WebXR Integration**: By using the WebXR API, players can engage in the game directly within their web browsers without requiring any installations.\\n- **Dynamic Game Logic**: The application implements robust game mechanics to handle stacking rules, legal moves, and track move history.\\n- **Responsive UI Overlay**: In-game user interface provides feedback, including move tracking and options to restart the game.\\n\\n### Technical Stack:\\n- **React**: For user interface and application logic.\\n- **WebXR**: For rendering and device input in the VR environment.\\n- **Three.js**: For 3D scene management, cameras, and object manipulation.\\n\\n### Learning Outcomes:\\nBuilding this VR application allowed me to gain hands-on experience in creating interactive VR experiences, managing complex state transitions within React, and optimizing performance for VR platforms.\\n\\n### Future Enhancements:\\nI also have ideas for future enhancements, including integrating audio feedback, implementing level selection, and exploring multiplayer options.\\n\\nIf you have any specific questions or would like to learn more about this project or my experiences with VR technology, feel free to ask!'"
]
},
"execution_count": 129,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat(\"did you worked on any vr projects? \",[])"
]
},
{
"cell_type": "code",
"execution_count": 130,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"* Running on local URL: http://127.0.0.1:7866\n",
"\n",
"To create a public link, set `share=True` in `launch()`.\n"
]
},
{
"data": {
"text/html": [
"<div><iframe src=\"http://127.0.0.1:7866/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": []
},
"execution_count": 130,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Did you done anything interesting in IA and machine learning?To provide some context, here are some projects done by djallel that might be related to the question that you need to answer.\n",
"\n",
"Potentially related projects:\n",
"🧠 ML Toolkit – A Customizable Machine Learning Library in Python\n",
"📌 Project Overview\n",
"ML Toolkit is a Python-based, modular machine learning library built from scratch to provide a flexible and transparent learning and experimentation environment. It supports a wide range of supervised learning algorithms, including both regression and classification models. Designed with extensibility and clarity in mind, it enables users to understand core ML concepts through hands-on model development and testing.\n",
"\n",
"This toolkit is ideal for those looking to deepen their understanding of machine learning by working directly with algorithmic implementations—without relying on high-level libraries like scikit-learn or TensorFlow.\n",
"\n",
"🧩 Implemented Models\n",
"🔍 Classification Algorithms:\n",
"Support Vector Machine (SVM)\n",
"\n",
"K-Nearest Neighbors (KNN) Classifier\n",
"\n",
"Gaussian Naive Bayes\n",
"\n",
"Multinomial Naive Bayes\n",
"\n",
"Decision Tree Classifier\n",
"\n",
"Non-Linear Classifier\n",
"\n",
"📈 Regression Algorithms:\n",
"K-Nearest Neighbors Regressor\n",
"\n",
"Decision Tree Regressor\n",
"\n",
"Non-Linear Regression\n",
"\n",
"⚙️ Core Features\n",
"✅ Fully Modular Architecture\n",
"Easily extend or swap components such as models, optimizers, and loss functions.\n",
"\n",
"🧠 Manual Gradient Computation\n",
"Gain an in-depth understanding of how gradient-based optimization works.\n",
"\n",
"🔧 Custom Training Loops\n",
"Fine-tune learning rates, batch sizes, and convergence conditions.\n",
"\n",
"🧪 No External ML Libraries\n",
"Built entirely in Python with NumPy for linear algebra operations.\n",
"\n",
"🧰 Tech Stack\n",
"Tool\tRole\n",
"Python 3\tCore development language\n",
"NumPy\tMatrix operations & math utils\n",
"Matplotlib*\t(Optional) For plotting and visualization\n",
"\n",
"\n",
"\n",
"Potentially related projects:\n",
"🏕️ The Wild Oasis – Cabin Booking & Management System\n",
"📌 Project Overview\n",
"The Wild Oasis is a modern web-based application built to simplify and streamline the management of cabin reservations and staff operations. It offers a secure, intuitive, and real-time experience for accommodation providers, combining powerful backend functionality with a sleek and responsive frontend.\n",
"\n",
"This project was an opportunity to deepen my expertise in React and Supabase, and to gain hands-on experience in building a complete full-stack solution from scratch.\n",
"\n",
"🌟 Key Features\n",
"👥 User & Role Management\n",
"Add new employees or modify existing user profiles.\n",
"\n",
"Role-based access and secured authentication with Supabase Auth.\n",
"\n",
"Email verification for account activation.\n",
"\n",
"🏡 Cabin Management\n",
"Add, update, and delete cabin details including capacity and pricing.\n",
"\n",
"Manage extra services (e.g., breakfast) for more flexible booking options.\n",
"\n",
"📅 Reservation System\n",
"Bookings include check-in/check-out management.\n",
"\n",
"View detailed booking info and attach extras.\n",
"\n",
"Ensure smooth daily operations with easy-to-navigate UI.\n",
"\n",
"📊 Interactive Dashboard\n",
"Daily summary of arrivals and departures.\n",
"\n",
"Visualize data using graphs showing occupancy rates and income trends.\n",
"\n",
"Gain quick insight into the business’s performance at a glance.\n",
"\n",
"🔐 Security & Privacy\n",
"Authentication and database security handled via Supabase.\n",
"\n",
"All sensitive operations are secured with role-based access and real-time sync.\n",
"\n",
"🧰 Tech Stack\n",
"Tech\tDescription\n",
"React\tComponent-based UI development\n",
"Vite\tLightweight and fast build tool\n",
"Styled Components\tCSS-in-JS for modular and scoped styles\n",
"React Router\tClient-side routing\n",
"React Query\tData fetching, caching, and synchronization\n",
"Supabase\tBackend-as-a-service: Auth, DB, Realtime\n",
"\n",
"🧪 Demo Login Credentials\n",
"text\n",
"Copy\n",
"Edit\n",
"email: [email protected]\n",
"password: Passwd1234\n",
"After logging in, new users can register and verify their accounts via confirmation email.\n",
"\n",
"🎓 What I Learned\n",
"🔧 React\n",
"Component Architecture: Improved modular thinking and reusability of code.\n",
"\n",
"State Management with Props: Gained a deeper understanding of dynamic UI development.\n",
"\n",
"🛠 Supabase\n",
"Data Handling: CRUD operations and seamless integration with front-end.\n",
"\n",
"Realtime Sync: Leveraged Supabase’s real-time capabilities to keep UI in sync.\n",
"\n",
"🔍 Development Practices\n",
"Complex App Design: Designed a full-stack, extensible, and scalable application.\n",
"\n",
"Debugging & Optimization: Learned to profile, debug, and enhance app performance.\n",
"\n",
"\n",
"\n",
"Potentially related projects:\n",
"Project Title:\n",
"CaisseApp – Cash Register and Daily Transaction Management System\n",
"\n",
"Project Description:\n",
"CaisseApp is a mobile application developed for UPS Connexlog Algeria to streamline and secure daily cash register operations. Designed for use by both desk agents and the finance team, the app allows agents to record all cash transactions throughout the day and automatically calculate the total amount in the register (\"caisse\") at closing time.\n",
"\n",
"In parallel, finance managers and administrators have real-time access to view and monitor cash registers across different branches or agents. This enhances transparency, accountability, and improves financial oversight across the organization.\n",
"\n",
"The app is built using Flutter, offering a responsive and reliable experience across mobile devices.\n",
"\n",
"Key Features:\n",
"💰 Daily Cash Register Tracking\n",
"Desk agents can input income and expense transactions, and the app automatically calculates the net amount in the register.\n",
"\n",
"🧾 Transaction History and Logs\n",
"Displays a clear, timestamped summary of all transactions for the day (e.g., payments, refunds, adjustments).\n",
"\n",
"👥 Role-Based Access\n",
"\n",
"Desk agents: Record and view only their own transactions.\n",
"\n",
"Finance team / Managers: View and monitor all agents’ cash activity in real time.\n",
"\n",
"📊 Real-Time Dashboard for Finance\n",
"Finance managers can see the current status of all caisses, monitor for discrepancies, and download reports if needed.\n",
"\n",
"🔒 Secure Data Handling\n",
"Ensures that transaction data is secure, centralized, and accessible only to authorized personnel.\n",
"\n",
"📱 Mobile-First Design\n",
"Built in Flutter for ease of use on Android and iOS devices.\n",
"\n",
"Technology Stack:\n",
"Flutter: Cross-platform mobile development\n",
"\n",
"Backend Server: expressJs NodeJs For data storage and real-time synchronization\n",
"\n",
"Role-Based Logic: Custom implementation for secure access control\n",
"\n",
"Local/Remote Sync: Can operate in offline mode and sync with server when connected\n",
"\n",
"Responsibilities & Achievements:\n",
"Designed and developed the full app architecture and user interface.\n",
"\n",
"Implemented secure transaction logging and caisse calculation logic.\n",
"\n",
"Created role-based access workflows for agent vs. manager use cases.\n",
"\n",
"Improved financial tracking accuracy and reduced manual reconciliation errors.\n",
"\n",
"Potentially related projects:\n",
"Project Title:\n",
"IoT System for Air Quality – Real-Time Indoor Pollution Monitoring and Forecasting\n",
"\n",
"Detailed Summary:\n",
"This project involves the design and implementation of a complete IoT system dedicated to real-time monitoring and prediction of indoor air quality, with a specific focus on PM2.5 fine particulate matter concentration. The main goal is to offer a low-cost, autonomous, and intelligent solution capable of continuously measuring air quality and predicting pollution peaks using machine learning models.\n",
"\n",
"Technical Architecture:\n",
"Physical Sensors (ESP32 + PM2.5 sensors):\n",
"Microcontrollers (ESP32) are equipped with air quality sensors to collect environmental data, including PM2.5 concentration, temperature, and humidity.\n",
"\n",
"Raspberry Pi (IoT Gateway):\n",
"A Raspberry Pi serves as the central gateway, aggregating data sent wirelessly from the ESP32 devices and preparing it for processing.\n",
"\n",
"Node-RED:\n",
"A flow-based visual development tool used for data stream processing, database integration, real-time dashboard visualization, and deployment of logic flows.\n",
"\n",
"Mosquitto MQTT Broker:\n",
"A lightweight MQTT message broker facilitates efficient communication between the sensors and the gateway, using the publish/subscribe model.\n",
"\n",
"Docker Compose:\n",
"The entire software infrastructure is containerized using Docker Compose, ensuring modularity, portability, and ease of deployment.\n",
"\n",
"Node.js Backend:\n",
"A backend server built with Node.js handles data ingestion, storage, and provides RESTful APIs for data access and integration.\n",
"\n",
"Machine Learning with TensorFlow, Scikit-learn, and Pandas:\n",
"\n",
"Collected data is cleaned, analyzed, and preprocessed using Pandas.\n",
"\n",
"Several machine learning models were implemented and compared to predict future PM2.5 levels, including linear regression, random forests, and neural networks.\n",
"\n",
"Training and evaluation were performed both locally on the Raspberry Pi and on development machines.\n",
"\n",
"The best-performing model was deployed in production to provide real-time predictive insights.\n",
"\n",
"Scientific Publication:\n",
"This work led to the publication of a research paper titled:\n",
"“Study and Comparison of Machine Learning Models for Air PM 2.5 Concentration Prediction,”\n",
"which presents a comprehensive comparative analysis of various ML models applied to air pollution forecasting.\n",
"\n",
"Key Features:\n",
"Real-time dashboard with live air quality indicators via Node-RED.\n",
"\n",
"Automatic data logging to a local or remote database.\n",
"\n",
"Alert system for pollution threshold exceedance.\n",
"\n",
"Short-term air quality forecasting, updated regularly.\n",
"\n",
"Modular, open-source, and reproducible architecture via Docker Compose.\n",
"\n",
"\n"
]
}
],
"source": [
"gr.ChatInterface(chat, type=\"messages\").launch()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "llms",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|