Nada2001 commited on
Commit
e7d2726
·
1 Parent(s): 90a94d5

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py DELETED
@@ -1,17 +0,0 @@
1
- import streamlit as st
2
- import torch
3
- import os
4
-
5
- def getResult(filename):
6
- model_name='/content/yolov5/runs/train/exp/weights/best.pt'
7
- model = torch.hub.load( "/content/yolov5/",'custom', source='local', path = model_name, force_reload = True)
8
- img = "/content/"+filename+""
9
- results = model(img)
10
- return results
11
-
12
- 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
- resulted_img = getResult(filename)
17
- img = st.image(resulted_img, caption='Sunrise by the mountains', use_column_width=True)