Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
|
5 |
def getResult(filename):
|
6 |
model_name='best.pt'
|
7 |
-
model = torch.hub.load( 'custom', source='local', path = model_name, force_reload = True)
|
8 |
img = "/content/"+filename+""
|
9 |
results = model(img)
|
10 |
return results
|
@@ -13,5 +13,5 @@ uploaded_file = st.file_uploader("Choose a image file")
|
|
13 |
if uploaded_file is not None:
|
14 |
image = uploaded_file.read()
|
15 |
filename = uploaded_file.name
|
16 |
-
|
17 |
img = st.image(image, caption='Sunrise by the mountains', use_column_width=True)
|
|
|
4 |
|
5 |
def getResult(filename):
|
6 |
model_name='best.pt'
|
7 |
+
model = torch.hub.load( "",'custom', source='local', path = model_name, force_reload = True)
|
8 |
img = "/content/"+filename+""
|
9 |
results = model(img)
|
10 |
return results
|
|
|
13 |
if uploaded_file is not None:
|
14 |
image = uploaded_file.read()
|
15 |
filename = uploaded_file.name
|
16 |
+
|
17 |
img = st.image(image, caption='Sunrise by the mountains', use_column_width=True)
|