Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ 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 |
-
|
19 |
-
|
|
|
20 |
|
21 |
gr.Interface(infer, inputs=[canvas], outputs=[text], title="Welcome to Hogwarts Sorting Hat!", description="Draw something and let the sorting hat sort you! π© ").launch()
|
|
|
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()
|