limitedonly41 commited on
Commit
afe7186
·
verified ·
1 Parent(s): 18155cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,7 +20,7 @@ feature_extractor = None
20
 
21
  # Inference function
22
  @spaces.GPU()
23
- def run_inference(image, feature_extractor, model, device, valid_ds):
24
  # Load image from the Gradio input
25
  input_image = Image.fromarray(image.astype('uint8'), 'RGB')
26
 
@@ -63,7 +63,7 @@ def run_inference(image, feature_extractor, model, device, valid_ds):
63
 
64
  # Create a Gradio interface
65
  iface = gr.Interface(
66
- fn=lambda image: run_inference(image, feature_extractor, model, device, valid_ds),
67
  inputs=gr.inputs.Image(type="numpy"), # Input is an image
68
  outputs="text", # Output is text (predicted class)
69
  title="Image Classification",
 
20
 
21
  # Inference function
22
  @spaces.GPU()
23
+ def run_inference(image, device, valid_ds):
24
  # Load image from the Gradio input
25
  input_image = Image.fromarray(image.astype('uint8'), 'RGB')
26
 
 
63
 
64
  # Create a Gradio interface
65
  iface = gr.Interface(
66
+ fn=lambda image: run_inference(image, device, valid_ds),
67
  inputs=gr.inputs.Image(type="numpy"), # Input is an image
68
  outputs="text", # Output is text (predicted class)
69
  title="Image Classification",