Spaces:
Runtime error
Runtime error
Update app.py (#1)
Browse files- Update app.py (d18c7840f7ce8edba7fd33daebe5fd5eb8113f4f)
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 |
-
|
|
|
|
|
|
|
| 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)
|