File size: 453 Bytes
1d6ca53
 
 
 
 
61f2630
1d6ca53
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr
import os
from functions import *

examples_dir = 'examples'
title = "Land Use Classification - ResNet34 PyTorch"
examples = [os.path.join(examples_dir, i) for i in os.listdir('examples')]

interface = gr.Interface(fn=predict, inputs=gr.Image(type= 'numpy', shape=(64, 64)).style(height= 256),
            outputs= gr.Label(num_top_classes= 5), cache_examples= False,
            examples= examples, title= title)

interface.launch()