Spaces:
Sleeping
Sleeping
IndianServers
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,11 @@ def predict(image):
|
|
15 |
|
16 |
# Perform inference
|
17 |
predictions = model(img)
|
18 |
-
return predictions.numpy() # Adjust output processing as needed
|
19 |
|
20 |
# Set up the Gradio interface
|
21 |
-
|
|
|
|
|
|
|
22 |
interface.launch()
|
|
|
15 |
|
16 |
# Perform inference
|
17 |
predictions = model(img)
|
18 |
+
return predictions.numpy().tolist() # Adjust output processing as needed
|
19 |
|
20 |
# Set up the Gradio interface
|
21 |
+
image_input = gr.inputs.Image(shape=(640, 640))
|
22 |
+
label_output = gr.outputs.Label(num_top_classes=3)
|
23 |
+
|
24 |
+
interface = gr.Interface(fn=predict, inputs=image_input, outputs=label_output)
|
25 |
interface.launch()
|