Akshat-1812 commited on
Commit
0ac849e
·
verified ·
1 Parent(s): 1381563

updated resize chage

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -46,7 +46,9 @@ labels = ['affenpinscher', 'afghan_hound', 'african_hunting_dog', 'airedale',
46
  # load the model
47
  def predict_breed(image):
48
 
49
-
 
 
50
  # reshape the input
51
  image = image.reshape((-1, 224, 224, 3))
52
 
@@ -69,11 +71,13 @@ enable_queue=True
69
 
70
  gr.Interface(
71
  fn=predict_breed,
72
- inputs=gr.inputs.Image(shape=(224, 224)),
73
- outputs=gr.outputs.Label(num_top_classes=3),
 
 
74
  title=title,
75
  description=description,
76
  examples=examples,
77
  cache_examples=True,
78
  examples_per_page=2,
79
- enable_queue=enable_queue).launch()
 
46
  # load the model
47
  def predict_breed(image):
48
 
49
+ ##---aks
50
+ image image.resize((224,224))
51
+ ##aks end
52
  # reshape the input
53
  image = image.reshape((-1, 224, 224, 3))
54
 
 
71
 
72
  gr.Interface(
73
  fn=predict_breed,
74
+ inputs=gr.Image(),
75
+ outputs=gr.Label(num_top_classes=3),
76
+ # inputs=gr.inputs.Image(shape=(224, 224)),
77
+ # outputs=gr.outputs.Label(num_top_classes=3),
78
  title=title,
79
  description=description,
80
  examples=examples,
81
  cache_examples=True,
82
  examples_per_page=2,
83
+ enable_queue=enable_queue).launch(debug=True)