Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,11 @@ st.set_page_config(page_title='Smoke & Fire Detection')
|
|
9 |
if 'history' not in st.session_state:
|
10 |
st.session_state.history = []
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
@st.cache(persist=True)
|
13 |
def loadModel():
|
14 |
pipeline = pip(task="image-classification", model="EdBianchi/vit-fire-detection")
|
@@ -49,8 +54,7 @@ if file_name is not None:
|
|
49 |
compute(image)
|
50 |
|
51 |
# DEMO IMAGE
|
52 |
-
demo_img
|
53 |
-
compute(demo_img)
|
54 |
|
55 |
# SIDEBAR
|
56 |
#st.sidebar.write("""""")
|
|
|
9 |
if 'history' not in st.session_state:
|
10 |
st.session_state.history = []
|
11 |
|
12 |
+
@st.cache()
|
13 |
+
def demo_img():
|
14 |
+
demo_img = Image.open("./demo.jpg")
|
15 |
+
compute(demo_img)
|
16 |
+
|
17 |
@st.cache(persist=True)
|
18 |
def loadModel():
|
19 |
pipeline = pip(task="image-classification", model="EdBianchi/vit-fire-detection")
|
|
|
54 |
compute(image)
|
55 |
|
56 |
# DEMO IMAGE
|
57 |
+
demo_img()
|
|
|
58 |
|
59 |
# SIDEBAR
|
60 |
#st.sidebar.write("""""")
|