vardaan123 commited on
Commit
9e8f09d
·
1 Parent(s): 4ac1937

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,7 +24,7 @@ from torchvision import transforms
24
  _DEFAULT_IMAGE_TENSOR_NORMALIZATION_MEAN = [0.485, 0.456, 0.406]
25
  _DEFAULT_IMAGE_TENSOR_NORMALIZATION_STD = [0.229, 0.224, 0.225]
26
 
27
- def evaluate(img, id2entity, target_list, args):
28
  num_ent_id = len(id2entity)
29
  model = DistMult(args, num_ent_id, target_list, args.device)
30
  model.to(args.device)
@@ -158,7 +158,7 @@ if __name__=='__main__':
158
 
159
  species_model = gr.Interface(
160
  evaluate,
161
- [gr.inputs.Image(shape=(200, 200)), id2entity, target_list, args],
162
  outputs="label",
163
  title = 'Species Classification',
164
  description = 'Species Classification',
 
24
  _DEFAULT_IMAGE_TENSOR_NORMALIZATION_MEAN = [0.485, 0.456, 0.406]
25
  _DEFAULT_IMAGE_TENSOR_NORMALIZATION_STD = [0.229, 0.224, 0.225]
26
 
27
+ def evaluate(img):
28
  num_ent_id = len(id2entity)
29
  model = DistMult(args, num_ent_id, target_list, args.device)
30
  model.to(args.device)
 
158
 
159
  species_model = gr.Interface(
160
  evaluate,
161
+ gr.inputs.Image(shape=(200, 200)),
162
  outputs="label",
163
  title = 'Species Classification',
164
  description = 'Species Classification',