{"id":26565189,"url":"https://github.com/absarraashid3/pi-casso","last_synced_at":"2026-05-16T11:02:13.067Z","repository":{"id":283413804,"uuid":"951681599","full_name":"AbsarRaashid3/Pi-casso","owner":"AbsarRaashid3","description":"Pi'casso is an AI-powered emoji math solver that uses a fine-tuned language model to solve emoji-based math riddles. Built with Hugging Face Transformers and Streamlit, it allows users to input emoji equations and get instant solutions. The app is optimized for efficiency with quantization and offloading.","archived":false,"fork":false,"pushed_at":"2025-03-20T04:53:02.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T05:29:10.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/AbsarRaashid3.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":"2025-03-20T04:30:41.000Z","updated_at":"2025-03-20T04:54:06.000Z","dependencies_parsed_at":"2025-03-20T05:39:20.335Z","dependency_job_id":null,"html_url":"https://github.com/AbsarRaashid3/Pi-casso","commit_stats":null,"previous_names":["absarraashid3/pi-casso"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FPi-casso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FPi-casso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FPi-casso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbsarRaashid3%2FPi-casso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbsarRaashid3","download_url":"https://codeload.github.com/AbsarRaashid3/Pi-casso/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244991892,"owners_count":20543713,"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-03-22T17:19:51.919Z","updated_at":"2025-10-24T08:13:06.065Z","avatar_url":"https://github.com/AbsarRaashid3.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pi'casso - Emoji Math Solver 🤖\n\nPi'casso is an AI-powered application that solves emoji-based math riddles! It utilizes a \ncustom-trained language model fine-tuned on a dataset of emoji math problems. \nUsers can input riddles in the form of emoji equations, and the AI will \nprovide the correct answer.\n\n## Features\n**Solve emoji-based math riddles such as \"🚀 + 🚀 = 18\".**\n**Uses a fine-tuned language model for high accuracy.**\n**Deploys the model with Streamlit to create an interactive web interface.**\n**Optimized for GPU usage with quantization and offloading.**\n**Accessible via a public URL using ngrok for easy sharing.**\n\n## Installation\n1)Clone the repository:\n```\ngit clone https://github.com/absarraashid3/picasso.git\ncd picasso\n```\n\n2)Set up a Python environment (optional but recommended):\n```\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n3)Install dependencies:\n```\npip install -r requirements.txt\n```\n4)Install additional dependencies if required:\n```\npip install pyngrok\n```\n**The requirements.txt file includes all the necessary dependencies such as torch, transformers, datasets, peft, and streamlit.**\n\n## Dataset\nThe dataset used to train the model consists of emoji-based math problems. Each entry in the dataset contains an emoji math equation along with its solution. The data is in CSV format.\n**You can find the dataset in the emoji_math_dataset_utf8.csv file.**\n\n## Model Training\nThe model used in Pi'casso is based on the Qwen1.5-4B-Chat architecture and fine-tuned using LoRA (Low-Rank Adaptation) for efficient training.\n\n## Steps for training the model:\n### Preprocess the Dataset:\nConvert the dataset to a format that can be used by Hugging Face’s datasets library.\nMap the dataset to the required format for model training.\n### Model Fine-Tuning:\nUse LoRA for efficient fine-tuning, which helps to reduce the memory usage and improve training efficiency.\nQuantize the model to 4-bit precision for even lower memory consumption, using BitsAndBytesConfig.\n### Training the Model:\nThe model is fine-tuned for 9 epochs using the Trainer class from Hugging Face. A test set is also used for evaluation.\n### Saving the Model:\nAfter training, the model and tokenizer are saved for deployment.\n\n## App Deployment\n### Streamlit Interface:\nPi'casso comes with an interactive Streamlit UI. The app allows users to input emoji math riddles, and the AI generates answers.\n\n### Model Loading:\nThe model is loaded with automatic device detection (GPU/CPU) for optimal performance.\nQuantization is applied for memory optimization.\n\n### Running the App:\nOnce the model is loaded, the user can enter a riddle and the model will generate the answer.\nThe app uses torch for generating predictions and streamlit for the user interface.\n\n### Steps for deploying the app:\nRun the Streamlit App: To start the app, run the following command:\n```\nstreamlit run app.py\n```\nExpose the app publicly using ngrok: After starting the app, you can expose it to the public by using ngrok:\n```\nngrok http 8501\n```\nThis will provide a public URL that can be shared with others.\n\n\n## Usage\n**After running the app, follow these steps:**\n### Enter an Emoji Math Riddle:\nInput an emoji equation such as:\n\n\"🚀 + 🚀 = 18\"\n\"🍕 + 🍕 + 🍕 + 🍕 = 16\"\n### Press the Solve Button:\nThe AI will process the input and generate an answer.\n### View the Answer:\nThe result will be displayed on the Streamlit app.\n\n## Acknowledgments\n**Hugging Face for their powerful transformers and datasets libraries.** \u003cbr\u003e\n**Streamlit for creating an easy-to-use interface.** \u003cbr\u003e\n**ngrok for enabling public app sharing.** \u003cbr\u003e\n\n## User Interface:\n![PICASSO](https://github.com/user-attachments/assets/66bbaaf3-34c1-4301-a711-f0418b5b62da)\n## Outputs:\n![Output](https://github.com/user-attachments/assets/c5fc6b7e-443a-464e-bfb9-2095940c8628)\n![PicassoOutput](https://github.com/user-attachments/assets/b57f0b64-c4a0-4246-be17-44736183086e)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsarraashid3%2Fpi-casso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabsarraashid3%2Fpi-casso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabsarraashid3%2Fpi-casso/lists"}