Youssef-Okeil commited on
Commit
710a81b
·
verified ·
1 Parent(s): 97e98e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -10,5 +10,10 @@ def image_classifier(img):
10
  pred,pred_idx,probs = model_inf.predict(img)
11
  return dict(zip(categories,map(float,probs)))
12
  examples_arch=['ArtDeco.jpg','Byzantine.jpg','Gothic.jpg','Neoclassical.jpg']
13
- intrf=gr.Interface(fn=image_classifier, inputs=gr.inputs.Image(shape=(192, 192)), outputs=gr.outputs.Label(num_top_classes=4),examples=examples_arch)
 
 
 
 
 
14
  intrf.launch(inline=False)
 
10
  pred,pred_idx,probs = model_inf.predict(img)
11
  return dict(zip(categories,map(float,probs)))
12
  examples_arch=['ArtDeco.jpg','Byzantine.jpg','Gothic.jpg','Neoclassical.jpg']
13
+ intrf=intrf = gr.Interface(
14
+ fn=image_classifier,
15
+ inputs=gr.Image(width=192, height=192), # Updated syntax
16
+ outputs=gr.Label(num_top_classes=4), # Updated syntax
17
+ examples=examples_arch
18
+ )
19
  intrf.launch(inline=False)