Spaces:
Running
Running
import gradio as gr | |
# Create title, description and article strings | |
title = "DeepFundus π" | |
description = "A ResNet50 feature extractor computer vision model to classify retina pathology from optical funduscopic images." | |
article = "Created for fun." | |
# Create the Gradio demo | |
demo = gr.Interface(fn=predict, # mapping function from input to output | |
inputs=gr.Image(type="pil"), # what are the inputs? | |
outputs=[gr.Label(num_top_classes=8, label="Predictions"), # what are the outputs? | |
gr.Number(label="Prediction time (s)")], # our fn has two outputs, therefore we have two outputs | |
examples=example_list, | |
title=title, | |
description=description, | |
article=article) | |
# Launch the demo! | |
demo.launch(debug=False, # print errors locally? | |
share=True) # generate a publically shareable URL? |