DHEIVER commited on
Commit
4700b60
·
1 Parent(s): 59a3399

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -32,6 +32,8 @@ def classify_image(image_file):
32
 
33
  return output_image, f"Predicted class: {label} (confidence: {confidence:.2f})"
34
 
 
 
35
  iface = gr.Interface(
36
  fn=classify_image,
37
  inputs=gr.inputs.Image(type="filepath", label="Upload an image"),
@@ -40,5 +42,4 @@ iface = gr.Interface(
40
  description="Classify images using a pre-trained ViT model",
41
  )
42
 
43
- # Launch the Gradio app
44
  iface.launch()
 
32
 
33
  return output_image, f"Predicted class: {label} (confidence: {confidence:.2f})"
34
 
35
+ from gradio import gradio as gr
36
+
37
  iface = gr.Interface(
38
  fn=classify_image,
39
  inputs=gr.inputs.Image(type="filepath", label="Upload an image"),
 
42
  description="Classify images using a pre-trained ViT model",
43
  )
44
 
 
45
  iface.launch()