Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,15 +125,15 @@ def predict(classification_mode, image):
|
|
| 125 |
|
| 126 |
description = """
|
| 127 |
<center><img src="https://huggingface.co/spaces/zklee98/SolarPanelAnomaly/resolve/main/images/dronePV_picture.jpg" width=270px> </center><br>
|
| 128 |
-
<center>This program identifies the type of anomaly found in solar panel using an image classification model and
|
| 129 |
-
<center> Step 1: Choose classification mode >
|
| 130 |
<center><i><b>(Models are trained on <a href="https://ai4earthscience.github.io/iclr-2020-workshop/papers/ai4earth22.pdf">InfraredSolarModules</a> dataset, and hence expect infrared image as input)</b></i></center>
|
| 131 |
"""
|
| 132 |
|
| 133 |
gr.Interface(fn=predict,
|
| 134 |
-
inputs= [gr.Dropdown(choices=['Binary Classification', 'Multiclass Classification'], label='Classification Mode:',
|
| 135 |
-
info='Choose to classify between anomaly and no-anomaly (Binary) OR between 12 different types of anomalies (Multi).'),
|
| 136 |
-
gr.Image(type='pil', label='Input infrared image: ')],
|
| 137 |
outputs=[gr.outputs.Label(num_top_classes=3, label='Detected:').style(container=False),
|
| 138 |
gr.Image(type='pil', label=' ').style(height=240, width=144),
|
| 139 |
gr.Textbox(label='Affected area:').style(container=False)],
|
|
|
|
| 125 |
|
| 126 |
description = """
|
| 127 |
<center><img src="https://huggingface.co/spaces/zklee98/SolarPanelAnomaly/resolve/main/images/dronePV_picture.jpg" width=270px> </center><br>
|
| 128 |
+
<center>This program identifies the type of anomaly found in solar panel using an image classification model and percentage of the affected area using an image segmentation model.</center><br><br><br>
|
| 129 |
+
<center> Step 1: Choose classification mode > Step 2: Upload your image > Step 3: Click Submit | Examples available below</center><br>
|
| 130 |
<center><i><b>(Models are trained on <a href="https://ai4earthscience.github.io/iclr-2020-workshop/papers/ai4earth22.pdf">InfraredSolarModules</a> dataset, and hence expect infrared image as input)</b></i></center>
|
| 131 |
"""
|
| 132 |
|
| 133 |
gr.Interface(fn=predict,
|
| 134 |
+
inputs= [gr.Dropdown(choices=['Binary Classification', 'Multiclass Classification'], label='(Step 1) Classification Mode:',
|
| 135 |
+
info='Choose to classify between anomaly and no-anomaly (Binary) OR between 12 different types of anomalies (Multi).').style(container=False),
|
| 136 |
+
gr.Image(type='pil', label='(Step 2) Input infrared image: ').style(container=False)],
|
| 137 |
outputs=[gr.outputs.Label(num_top_classes=3, label='Detected:').style(container=False),
|
| 138 |
gr.Image(type='pil', label=' ').style(height=240, width=144),
|
| 139 |
gr.Textbox(label='Affected area:').style(container=False)],
|