Spaces:
Runtime error
Runtime error
File size: 3,471 Bytes
6d8a119 2dbc5b3 3fa47a9 6d8a119 2dbc5b3 05eb3ef 2dbc5b3 3fa47a9 6194ace 2dbc5b3 6fcff9a 3fa47a9 6d8a119 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import os
import gradio as gr
# Ejemplos imágenes región de Antofagasta
os.system("wget -O cordillera_806.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/cordillera_806.png")
os.system("wget -O cordillera_943.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/cordillera_943.png")
os.system("wget -O glaciar_657.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/glaciar_657.png")
os.system("wget -O glaciar_719.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/glaciar_719.png")
# Ejemplos imágenes de la zona del Huasco
os.system("wget -O demo_c_0.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_c_0.png")
os.system("wget -O demo_c_1.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_c_1.png")
os.system("wget -O demo_c_2.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_c_2.png")
os.system("wget -O demo_c_3.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_c_3.png")
os.system("wget -O demo_g_0.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_g_0.png")
os.system("wget -O demo_g_1.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_g_1.png")
os.system("wget -O demo_g_2.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_g_2.png")
os.system("wget -O demo_g_3.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/demo_g_3.png")
os.system("wget -O cordillera_arg_1.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/cordillera_arg_1.png")
os.system("wget -O cordillera_arg_2.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/cordillera_arg_2.png")
os.system("wget -O glaciar_arg_1.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/glaciar_arg_1.png")
os.system("wget -O glaciar_arg_2.png https://huggingface.co/spaces/alkzar90/rock-glacier-detector/resolve/main/example_images/glaciar_arg_2.png")
iface = gr.Interface.load(name='alkzar90/skynet',
src='models',
title='Skynet: detector de glaciares de roca 🛰️ + 🗡️',
description="Modelo de clasificación de imágenes para detectar glaciares de roca.<br> Se entrenó un modelo [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) con _fine-tuning_ en el [rock-glacier-dataset](https://huggingface.co/datasets/alkzar90/rock-glacier-dataset)",
examples=[['cordillera_806.png'], ['cordillera_943.png'], ['glaciar_657.png'], ['glaciar_719.png'],
['demo_c_0.png'], ['demo_c_1.png'], ['demo_c_2.png'], ['demo_c_3.png'],
['demo_g_0.png'], ['demo_g_1.png'], ['demo_g_2.png'], ['demo_g_3.png'],
['cordillera_arg_1.png'], ['cordillera_arg_2.png'], ['glaciar_arg_1.png'], ['glaciar_arg_2.png']],
cache_examples=False)
if __name__ == "__main__":
iface.launch()
|