binaychandra commited on
Commit
ae367d4
·
1 Parent(s): 7bdadbc

vision0.121

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from PIL import Image
5
  import requests
6
 
7
  # Load the pre-trained ResNet model
8
- model = models.mobilenet_v2(pretrained=True)
9
  model.eval()
10
 
11
  # Define the transformation for input images
@@ -40,7 +40,7 @@ def classify_image(input_image):
40
  return predicted_label
41
 
42
  # Gradio UI components
43
- image_input = gr.Image(preprocessing_fn=lambda img: Image.open(img.name))
44
  output_label = gr.Textbox()
45
 
46
  # Gradio interface
 
5
  import requests
6
 
7
  # Load the pre-trained ResNet model
8
+ model = models.resnet50(pretrained=True)
9
  model.eval()
10
 
11
  # Define the transformation for input images
 
40
  return predicted_label
41
 
42
  # Gradio UI components
43
+ image_input = gr.Image()
44
  output_label = gr.Textbox()
45
 
46
  # Gradio interface
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  gradio
2
- pillow
3
  torch
4
  requests
5
  torchvision==0.12.0
 
1
  gradio
2
+ Pillow
3
  torch
4
  requests
5
  torchvision==0.12.0