IndianServers commited on
Commit
b27e7fb
·
verified ·
1 Parent(s): fc0786d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- interface = gr.Interface(fn=predict, inputs=gr.inputs.Image(type="pil"), outputs="label")
 
 
 
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()