Preethamreddy799 commited on
Commit
09bf51b
·
1 Parent(s): 365723d

Add app.py and dependencies

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -2,7 +2,7 @@
2
  import streamlit as st
3
  import pickle
4
  import numpy as np
5
- from huggingface_hub import hf_hub_url, cached_download
6
  import os
7
 
8
 
@@ -11,8 +11,7 @@ def load_model():
11
  filename = 'model_test_steps.pkl'
12
 
13
  # Get model URL and download
14
- model_url = hf_hub_url(repo_id=repo_id, filename=filename)
15
- cached_model_path = cached_download(model_url)
16
 
17
  # Load the model from the cached path
18
  with open(cached_model_path, 'rb') as file:
 
2
  import streamlit as st
3
  import pickle
4
  import numpy as np
5
+ from huggingface_hub import hf_hub_download
6
  import os
7
 
8
 
 
11
  filename = 'model_test_steps.pkl'
12
 
13
  # Get model URL and download
14
+ cached_model_path = hf_hub_download(repo_id=repo_id, filename=filename)
 
15
 
16
  # Load the model from the cached path
17
  with open(cached_model_path, 'rb') as file: