merve HF Staff commited on
Commit
86de679
Β·
1 Parent(s): 61b77d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,9 +14,10 @@ text = gr.outputs.Textbox()
14
  def infer(image):
15
  cls = np.argmax(model.predict(np.expand_dims(image, axis = 0)[:,:,:,1]))
16
  if cls == 9:
17
- return "Death eater detected! πŸ’€"
18
  else:
19
  cls = labels[cls]
20
- return f"Welcome to {cls}"
 
21
 
22
  gr.Interface(infer, inputs=[canvas], outputs=[text], title="Welcome to Hogwarts Sorting Hat!", description="Draw something and let the sorting hat sort you! 🎩 ").launch()
 
14
  def infer(image):
15
  cls = np.argmax(model.predict(np.expand_dims(image, axis = 0)[:,:,:,1]))
16
  if cls == 9:
17
+ output = "Death eater detected! πŸ’€"
18
  else:
19
  cls = labels[cls]
20
+ output = f"Welcome to {cls}"
21
+ return output
22
 
23
  gr.Interface(infer, inputs=[canvas], outputs=[text], title="Welcome to Hogwarts Sorting Hat!", description="Draw something and let the sorting hat sort you! 🎩 ").launch()