Paulie-Aditya commited on
Commit
d18c784
·
verified ·
1 Parent(s): ac809d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -6,15 +6,18 @@ from PIL import Image
6
  import requests
7
  from io import BytesIO
8
  import gradio as gr
 
9
 
10
  model_dict = pickle.load(open('stacked_model_new.p', 'rb'))
11
 
12
  labels = ['A','B','C','D','E','F','G','H','I','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y']
13
 
14
- model = model_dict['model']
 
 
15
 
16
 
17
- # get url from backend
18
 
19
  def predict(url):
20
  response = requests.get(url)
 
6
  import requests
7
  from io import BytesIO
8
  import gradio as gr
9
+ from huggingface_hub import hf_hub_download
10
 
11
  model_dict = pickle.load(open('stacked_model_new.p', 'rb'))
12
 
13
  labels = ['A','B','C','D','E','F','G','H','I','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y']
14
 
15
+ model_path = hf_hub_download(repo_id="Paulie-Aditya/SignSense-Model", filename="stacked_model_new.p")
16
+ model_dict = pickle.load(open(model_path, "rb"))
17
+ model = model_dict["model"]
18
 
19
 
20
+ # # get url from backend
21
 
22
  def predict(url):
23
  response = requests.get(url)