EdBianchi commited on
Commit
01bd7cc
·
1 Parent(s): 909fb36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -24,9 +24,9 @@ def compute(image):
24
  with st.container():
25
  st.write("### Classification Outputs:")
26
  col1, col2, col6 = st.columns(3)
27
- col1.metric(predictions[0]['label'], str(round(predictions[0]['score']*100, 1))+"%", delta = 50)
28
- col2.metric(predictions[1]['label'], str(round(predictions[1]['score']*100, 1))+"%", delta = 50)
29
- col6.metric(predictions[2]['label'], str(round(predictions[2]['score']*100, 1))+"%", delta = 50)
30
  return None
31
 
32
  # INIT
@@ -34,11 +34,11 @@ with st.spinner('Loading the model, this could take some time...'):
34
  pipeline = loadModel()
35
 
36
  # TITLE
37
- st.write("# Fire in Forest Environments")
38
- st.write("""Wildfires or forest fires are *unpredictable catastrophic and destructive* events that affect *rural areas*.
39
- The impact of these events affects both *vegetation and wildlife*.
40
 
41
- This application showcases the *vit-fire-detection* model, a version of google **vit-base-patch16-224-in21k** vision transformer *fine-tuned for smoke and fire detection*. In particular, we can imagine a setup in which webcams, drones, or other recording devices *take pictures of a wild environment every t seconds or minutes*. The proposed system is then able to classify the current situation as *normal, smoke, or fire*.
42
  """)
43
 
44
  st.write("### Upload an image to see the classifier in action")
 
24
  with st.container():
25
  st.write("### Classification Outputs:")
26
  col1, col2, col6 = st.columns(3)
27
+ col1.metric(predictions[0]['label'], str(round(predictions[0]['score']*100, 1))+"%")
28
+ col2.metric(predictions[1]['label'], str(round(predictions[1]['score']*100, 1))+"%")
29
+ col6.metric(predictions[2]['label'], str(round(predictions[2]['score']*100, 1))+"%")
30
  return None
31
 
32
  # INIT
 
34
  pipeline = loadModel()
35
 
36
  # TITLE
37
+ st.write("# 🌲 Fire in Forest Environments 🌲")
38
+ st.write("""Wildfires or forest fires are **unpredictable catastrophic and destructive** events that affect **rural areas**.
39
+ The impact of these events affects both **vegetation and wildlife**.
40
 
41
+ This application showcases the **vit-fire-detection** model, a version of google **vit-base-patch16-224-in21k** vision transformer fine-tuned for **smoke and fire detection**. In particular, we can imagine a setup in which webcams, drones, or other recording devices **take pictures of a wild environment every t seconds or minutes**. The proposed system is then able to classify the current situation as **normal, smoke, or fire**.
42
  """)
43
 
44
  st.write("### Upload an image to see the classifier in action")