benjaminStreltzin commited on
Commit
38b27ef
·
verified ·
1 Parent(s): 3f5872b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -12,17 +12,16 @@ def predict(image: Image.Image):
12
  animation.visible = False # Hide the animation
13
  return result, f"Confidence: {confidence:.2f}%"
14
 
15
- theme = gr.themes.Soft()
16
 
17
- with gr.Interface(theme=theme) as demo:
18
  # Define the Gradio interface
19
- gr.Interface(
20
- fn=predict,
21
- inputs=gr.Image(type="pil"),
22
- outputs=[gr.Textbox(), gr.Textbox()],
23
- title="Vision Transformer Model",
24
- description="Upload an image to classify it using the Vision Transformer model."
25
- )
 
26
 
27
  # Launch the Gradio interface
28
  if __name__ == "__main__":
 
12
  animation.visible = False # Hide the animation
13
  return result, f"Confidence: {confidence:.2f}%"
14
 
 
15
 
 
16
  # Define the Gradio interface
17
+ gr.Interface(
18
+ fn=predict,
19
+ inputs=gr.Image(type="pil"),
20
+ outputs=[gr.Textbox(), gr.Textbox()],
21
+ title="Vision Transformer Model",
22
+ description="Upload an image to classify it using the Vision Transformer model.",
23
+ theme = gr.themes.Soft()
24
+ )
25
 
26
  # Launch the Gradio interface
27
  if __name__ == "__main__":