Victorlopo21 commited on
Commit
8d01398
·
1 Parent(s): bfc574b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -21,15 +21,17 @@ import hopsworks
21
  # from huggingface_hub import hf_hub_download
22
  # m = hf_hub_download(repo_id="marvmk/model-test", filename="model.pkl")
23
 
24
- #project = hopsworks.login(api_key_value="4CY1rwa8iz8Yu6gG.TwayrYmsX4GQfhSp3LNKYTLvyFMfqAvnzNUQp5ae9K5HhfYxb5mcnLAutm1K18zV")
25
- #mr = project.get_model_registry()
26
- #model = mr.get_model("stock_modal", version=1)
27
- #model_dir = model.download()
28
- #model = joblib.load(model_dir + "/stock_model.pkl")
29
-
30
- from huggingface_hub import hf_hub_download
31
- m = hf_hub_download(repo_id="marvmk/model-test", filename="model.pkl")
32
- model = pickle.load(open(m, 'rb'))
 
 
33
 
34
 
35
 
 
21
  # from huggingface_hub import hf_hub_download
22
  # m = hf_hub_download(repo_id="marvmk/model-test", filename="model.pkl")
23
 
24
+ project = hopsworks.login(api_key_value="4CY1rwa8iz8Yu6gG.TwayrYmsX4GQfhSp3LNKYTLvyFMfqAvnzNUQp5ae9K5HhfYxb5mcnLAutm1K18zV")
25
+ fs = project.get_feature_store()
26
+
27
+ mr = project.get_model_registry()
28
+ model = mr.get_model("stock_modal", version=1)
29
+ model_dir = model.download()
30
+ model = joblib.load(model_dir + "/stock_model.pkl")
31
+
32
+ #from huggingface_hub import hf_hub_download
33
+ #m = hf_hub_download(repo_id="marvmk/model-test", filename="model.pkl")
34
+ #model = pickle.load(open(m, 'rb'))
35
 
36
 
37