Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -110,30 +110,35 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue="zinc",
|
|
110 |
<img src='file/dd_logo.png' width='200'>
|
111 |
"""
|
112 |
gr.Markdown(markdown_content)
|
113 |
-
gr.Markdown("# 🔥
|
114 |
-
|
115 |
-
gr.Markdown(""" ##
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
with gr.Column():
|
127 |
-
image = gr.Image(label = "
|
128 |
|
129 |
-
gallery = gr.Gallery(value = examples, label="
|
130 |
|
131 |
def get_select_index(evt: gr.SelectData):
|
132 |
return examples[evt.index]
|
133 |
|
134 |
gallery.select(get_select_index, None, image)
|
135 |
-
action = gr.Button("
|
136 |
-
prediction = gr.Textbox(label = "
|
137 |
|
138 |
action.click(fn=predict, inputs=image, outputs=prediction)
|
139 |
|
|
|
110 |
<img src='file/dd_logo.png' width='200'>
|
111 |
"""
|
112 |
gr.Markdown(markdown_content)
|
113 |
+
gr.Markdown("# 🔥 Early Fire Detection 🔥")
|
114 |
+
|
115 |
+
gr.Markdown(""" ## Spot Fire, Preserve Nature! Effortlessly tell apart smoke from clouds using our smart fire detection technology.
|
116 |
+
Our system is enhanced by a comprehensive database of more than 14,000 images and sophisticated machine learning algorithms,
|
117 |
+
facilitating prompt identification of fire. Fast, intelligent, and vigilant – we safeguard our environment against the initial threat signs.
|
118 |
+
|
119 |
+
|
120 |
+
The model was trained on the "smokedataset" by Jakub Szumny, from the Math and Computer Science Division at the University of Illinois at Urbana-Champaign.
|
121 |
+
This dataset is accessible at [Hugging Face](https://huggingface.co/datasets/sagecontinuum/smokedataset).""")
|
122 |
+
|
123 |
+
with gr.Accordion("Details", open = False):
|
124 |
+
gr.Markdown("""The rise in fire incidents, intensified by climate change, poses a significant challenge for quick detection and action.
|
125 |
+
Conventional methods of fire detection, like manual observation and reporting, are often too slow, particularly in remote locations.
|
126 |
+
Automated smoke detection systems provide a solution, leveraging deep learning for rapid and precise smoke detection in images.
|
127 |
+
The skill to differentiate smoke from visually similar occurrences, such as clouds, is vital. This distinction leads to quicker identification of fire sources,
|
128 |
+
allowing for faster response times and possibly preserving large tracts of natural and inhabited areas from devastation.
|
129 |
+
Enhancing the speed and precision of fire detection can greatly reduce their effects on communities, economies, and ecosystems.""")
|
130 |
|
131 |
with gr.Column():
|
132 |
+
image = gr.Image(label = "Picture")
|
133 |
|
134 |
+
gallery = gr.Gallery(value = examples, label="Example photos",columns=[4], rows=[1], height=200, object_fit = "scale-down")
|
135 |
|
136 |
def get_select_index(evt: gr.SelectData):
|
137 |
return examples[evt.index]
|
138 |
|
139 |
gallery.select(get_select_index, None, image)
|
140 |
+
action = gr.Button("Detect")
|
141 |
+
prediction = gr.Textbox(label = "Prediction")
|
142 |
|
143 |
action.click(fn=predict, inputs=image, outputs=prediction)
|
144 |
|