lastcode commited on
Commit
268218a
·
verified ·
1 Parent(s): 0dc5036

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -9
README.md CHANGED
@@ -30,14 +30,18 @@ Both outputs ≥ 80% when Distillate_To_Feed_Ratio is between 0.20 and 0.44.
30
  ## Usage
31
  ```python
32
  import joblib
 
33
  from huggingface_hub import hf_hub_download
34
 
35
- path = hf_hub_download("your-username/pyrolysis-distillation-predictor",
36
- "pyrolysis_model.joblib")
37
- model = joblib.load(path)
38
-
39
- prediction = model.predict([[0.35, 10, 2.5, 150, 1000]])
40
- print(f"NAPTHA: {prediction[0][0]:.3f}, DIESEL: {prediction[0][1]:.3f}")
41
- ```
42
-
43
- One thing to keep in mind: HuggingFace doesn't natively "understand" sklearn models the way it understands transformers, so there's no automatic inference API. If you want a live demo, you'd pair it with a **Gradio Space** — which is actually very easy and looks great for a senior project presentation. Want me to write that too?
 
 
 
 
30
  ## Usage
31
  ```python
32
  import joblib
33
+ import numpy as np
34
  from huggingface_hub import hf_hub_download
35
 
36
+ model_path = hf_hub_download(
37
+ repo_id="lastcode/pyrolysis-distillation-predictor",
38
+ filename="pyrolysis_model.joblib"
39
+ )
40
+ model = joblib.load(model_path)
41
+
42
+ # [Distillate_To_Feed_Ratio, Feed_Stage, top_stage_pressure, Temp, Feed_Flow_Rate]
43
+ X = np.array([[0.35, 10, 2.5, 150, 1000]])
44
+ pred = model.predict(X)
45
+ print(f"NAPTHA: {pred[0][0]:.3f}")
46
+ print(f"DIESEL: {pred[0][1]:.3f}")
47
+ ```