{"id":25264367,"url":"https://github.com/samadpls/goldpredictapi","last_synced_at":"2025-07-03T13:04:28.149Z","repository":{"id":215152627,"uuid":"738247136","full_name":"samadpls/GoldPredictAPI","owner":"samadpls","description":"FastAPI-based gold price prediction system using machine learning. Trained model and API for seamless usability. 📈🤖","archived":false,"fork":false,"pushed_at":"2024-01-02T19:37:28.000Z","size":3774,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T07:49:35.833Z","etag":null,"topics":["api","fastapi","gold-price-prediction","machine-learning","pydantic","regression-models","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/samadpls.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}},"created_at":"2024-01-02T19:29:21.000Z","updated_at":"2024-12-18T10:09:36.000Z","dependencies_parsed_at":"2024-01-02T20:45:27.940Z","dependency_job_id":null,"html_url":"https://github.com/samadpls/GoldPredictAPI","commit_stats":null,"previous_names":["samadpls/goldpredictapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FGoldPredictAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FGoldPredictAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FGoldPredictAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FGoldPredictAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samadpls","download_url":"https://codeload.github.com/samadpls/GoldPredictAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423458,"owners_count":20936620,"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":["api","fastapi","gold-price-prediction","machine-learning","pydantic","regression-models","swagger-ui"],"created_at":"2025-02-12T07:36:41.444Z","updated_at":"2025-04-06T01:30:25.887Z","avatar_url":"https://github.com/samadpls.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoldPredictAPI 📈🤖\n\nThis project implements a gold price prediction system using machine learning. The system is trained on historical gold price data and provides a `FastAPI`-based API for making predictions.\n\n## Files 📂\n\n- **gld_predication.py**: FastAPI app with a pre-trained model, offering an API endpoint for gold price predictions.\n\n- **Gold Price Prediction.ipynb**: Jupyter Notebook for initial gold price data exploration, preprocessing, and training of the RandomForestRegressor model.\n\n## Dependencies 🛠️\n\n- FastAPI\n- Scikit-learn\n- NumPy\n- Pandas\n- Matplotlib\n- Seaborn\n\n## How to Use 🚀\n\n1. Install dependencies:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n2. Run the FastAPI application:\n\n    ```bash\n    uvicorn gld_predication:app --reload\n    ```\n\n    This will start the FastAPI server locally.\n\n3. Make predictions using Swagger:\n\n    Open your web browser and go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) to access the Swagger UI.\n\n    - Click on the `/predict` endpoint.\n    - Click on the \"Try it out\" button.\n    - Input the sample request data:\n\n        ```json\n        {\n          \"SPX\": 2671.91992,\n          \"USO\": 14.0600,\n          \"SLV\": 15.5100,\n          \"EUR_USD\": 1.186789\n        }\n        ```\n\n    - Click on the \"Execute\" button to make a prediction.\n      ![demo](https://github.com/samadpls/GoldPredictAPI/assets/94792103/0876bea2-aa30-4a63-a0a7-0e75badc699f)\n\n\n4. Make predictions using curl:\n\n    Alternatively, you can use `curl` to make predictions:\n\n    ```bash\n    curl -X 'POST' \\\n      'http://127.0.0.1:8000/predict' \\\n      -H 'accept: application/json' \\\n      -H 'Content-Type: application/json' \\\n      -d '{\n      \"SPX\": 2671.91992,\n      \"USO\": 14.0600,\n      \"SLV\": 15.5100,\n      \"EUR_USD\": 1.186789\n    }'\n    ```\n\n## Additional Information ℹ️\n\n- **Colab Notebook**: The `Gold Price Prediction.ipynb` file in Google Colab contains the initial exploration and model training.\n\n- **Model Saving**: The trained model is saved as `gld_data.pkl` using the `pickle` library and loaded by the FastAPI application for predictions.\n\n## License 📄\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamadpls%2Fgoldpredictapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamadpls%2Fgoldpredictapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamadpls%2Fgoldpredictapi/lists"}