Instructions to use lastcode/pyrolysis-distillation-predictor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use lastcode/pyrolysis-distillation-predictor with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("lastcode/pyrolysis-distillation-predictor", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| tags: | |
| - sklearn | |
| - tabular-regression | |
| - distillation | |
| - chemical-engineering | |
| # Pyrolysis Distillation Predictor | |
| Predicts NAPTHA and DIESEL purity from distillation column operating conditions. | |
| ## Inputs | |
| | Feature | Description | | |
| |---|---| | |
| | Distillate_To_Feed_Ratio | Ratio of distillate to feed flow | | |
| | Feed_Stage | Feed stage number | | |
| | top_stage_pressure_(bar) | Top stage pressure | | |
| | Temp_of_Field_(C) | Field temperature | | |
| | Feed_Flow_Rate_(Kg/hr) | Feed flow rate | | |
| ## Outputs | |
| - `NAPTHA`: predicted purity (0–1) | |
| - `DIESEL`: predicted purity (0–1) | |
| ## Feasible Operating Zone | |
| Both outputs ≥ 80% when Distillate_To_Feed_Ratio is between 0.20 and 0.44. | |
| ## Usage | |
| ```python | |
| import joblib | |
| import numpy as np | |
| from huggingface_hub import hf_hub_download | |
| model_path = hf_hub_download( | |
| repo_id="lastcode/pyrolysis-distillation-predictor", | |
| filename="pyrolysis_model.joblib" | |
| ) | |
| model = joblib.load(model_path) | |
| # [Distillate_To_Feed_Ratio, Feed_Stage, top_stage_pressure, Temp, Feed_Flow_Rate] | |
| X = np.array([[0.35, 10, 2.5, 150, 1000]]) | |
| pred = model.predict(X) | |
| print(f"NAPTHA: {pred[0][0]:.3f}") | |
| print(f"DIESEL: {pred[0][1]:.3f}") | |
| ``` |