{"id":51358361,"url":"https://github.com/teonghan/predictor","last_synced_at":"2026-07-02T21:10:04.597Z","repository":{"id":305838477,"uuid":"1024091154","full_name":"teonghan/predictor","owner":"teonghan","description":"A flexible Streamlit tool to load a trained model (.pkl) and generate predictions via single entry or batch upload — all within a friendly web interface.","archived":false,"fork":false,"pushed_at":"2025-08-07T23:29:49.000Z","size":434,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T01:07:02.192Z","etag":null,"topics":["prediction","python","streamlit"],"latest_commit_sha":null,"homepage":"","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/teonghan.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,"zenodo":null}},"created_at":"2025-07-22T07:08:46.000Z","updated_at":"2025-08-07T23:30:45.000Z","dependencies_parsed_at":"2025-07-22T09:37:34.386Z","dependency_job_id":"faf366eb-cb2f-4c1a-a73a-3020780e435d","html_url":"https://github.com/teonghan/predictor","commit_stats":null,"previous_names":["teonghan/predictor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teonghan/predictor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teonghan%2Fpredictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teonghan%2Fpredictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teonghan%2Fpredictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teonghan%2Fpredictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teonghan","download_url":"https://codeload.github.com/teonghan/predictor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teonghan%2Fpredictor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35062936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["prediction","python","streamlit"],"created_at":"2026-07-02T21:10:03.626Z","updated_at":"2026-07-02T21:10:04.541Z","avatar_url":"https://github.com/teonghan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔮 Model Prediction App\n\nA flexible Streamlit tool to **load a trained model (.pkl)** and generate predictions via single entry or batch upload — all within a friendly web interface.\n\nTry it online 👉 *https://predictor-pickle.streamlit.app/*\n\n---\n\n## 🚀 Overview\n\nThis app helps you perform fast predictions using your trained machine learning model (classification or regression) by:\n\n- 📤 Uploading your `.pkl` model (with metadata)\n- 🔢 Entering a single data row (with input UI)\n- 📄 Uploading a full dataset (CSV or Excel)\n- 🧼 Auto-preprocessing your inputs (e.g., one-hot encoding, missing features)\n\n---\n\n## ✅ Key Features\n\n- Supports both **regression** and **classification**\n- Visual mapping of class labels\n- Shows prediction probabilities (if available)\n- Downloadable batch predictions (CSV)\n- Works with **categorical**, **numerical**, and **mixed** features\n\n---\n\n## 🛠 Installation\n\n### Option 1: One-Click macOS Installer\n\n```bash\nbash installer-macos-universal.sh\n```\n\nWhat it does:\n- Detects Apple Silicon or Intel\n- Installs Miniforge if not found\n- Creates conda env (`modelprediction`)\n- Adds Desktop shortcut with Automator icon\n\n---\n\n### Option 2: One-Click Windows Installer\n\n```powershell\nRight-click → Run with PowerShell → installer-windows.ps1\n```\n\nWhat it does:\n- Detects Anaconda/Miniconda\n- Creates or updates `modelprediction` env from `__environment__.yml`\n- Creates launcher (`start-streamlit-app.ps1`)\n- Adds Desktop shortcut (`Start Model Prediction App`)\n- Generates uninstaller (`uninstall-streamlit-app.ps1`)\n\n\u003e 💡 **Note**: Ensure Conda is installed before running.\n\n---\n\n### Option 3: Manual Setup\n\n```bash\ngit clone https://github.com/teonghan/predictor.git\ncd predictor\nconda env create -f __environment__.yml\nconda activate modelprediction\nstreamlit run app.py\n```\n\n---\n\n## 📦 Model Format Requirements\n\nThe uploaded `.pkl` must be a dictionary like:\n\n```python\n{\n  'model': trained_model,\n  'feature_names': [...],\n  'target_column': 'Your Target',\n  'is_regression': True or False,\n  'label_encoder': encoder_or_None,\n  'original_predictor_cols': [...],\n  'categorical_unique_values': {...},\n  'one_hot_encoded_feature_map': {...}\n}\n```\n\nIf something’s missing or malformed, the app will show a helpful error.\n\n---\n\n## 🧪 Input Data\n\nYou can either:\n1. **Manually input** values for prediction (single-row)\n2. **Upload batch files** (`.csv`, `.xlsx`) and download prediction results\n\nUploaded files must have all expected feature columns. Missing values will be auto-filled.\n\n---\n\n## 📦 Dependencies\n\nIncluded in `__environment__.yml` or `requirements.txt`:\n\n- `streamlit`\n- `pandas`\n- `numpy`\n- `scikit-learn`\n- `lightgbm`\n\n---\n\n## 📃 License\n\nMIT License — free for personal, academic, or commercial use.\n\n---\n\n\u003e 🧠 Predict smarter, faster — without writing another line of code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteonghan%2Fpredictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteonghan%2Fpredictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteonghan%2Fpredictor/lists"}