import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline(task="image-classification", | |
model="canadianjosieharrison/swinv2-large-patch4-window12-192-22k-huggingface") | |
gr.Interface.from_pipeline(pipe, | |
title="Facade material classification", | |
description="Upload a Google Streetview image to classify the facade materials.", | |
examples = ["vancouver.PNG", "toronto.PNG", "landskrona.PNG", "gtb_central_train.PNG"], | |
).launch(share=True) |