Spaces:
Running
Running
app.py
CHANGED
|
@@ -27,15 +27,16 @@ example_list = [["examples/" + example, example.split('_')[0]] for example in os
|
|
| 27 |
|
| 28 |
# Create the Gradio demo
|
| 29 |
# The output of the prediction must be in a dictionary format!
|
| 30 |
-
demo = gr.Interface(
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# Launch the demo!
|
| 40 |
-
demo.launch()
|
| 41 |
-
# ?d
|
|
|
|
| 27 |
|
| 28 |
# Create the Gradio demo
|
| 29 |
# The output of the prediction must be in a dictionary format!
|
| 30 |
+
demo = gr.Interface(
|
| 31 |
+
fn=predict, # mapping function from input to output
|
| 32 |
+
inputs=gr.Image(type="pil"), # what are the inputs?
|
| 33 |
+
outputs=[gr.Label(num_top_classes=5, label="Predictions"), # what are the outputs?
|
| 34 |
+
gr.Number(label="Prediction time (s)")],
|
| 35 |
+
# examples=example_list,
|
| 36 |
+
title=title,
|
| 37 |
+
description=description,
|
| 38 |
+
example_labels=example_names
|
| 39 |
+
)
|
| 40 |
|
| 41 |
# Launch the demo!
|
| 42 |
+
demo.launch()
|
|
|