Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def predict(image):
|
|
28 |
print("Model output:", output)
|
29 |
class_idx = torch.argmax(output, dim=1).item()
|
30 |
|
31 |
-
return "Diagram" if class_idx ==
|
32 |
|
33 |
except Exception as e:
|
34 |
print("Error during prediction:", str(e))
|
|
|
28 |
print("Model output:", output)
|
29 |
class_idx = torch.argmax(output, dim=1).item()
|
30 |
|
31 |
+
return "Diagram" if class_idx == 0 else "Not Diagram"
|
32 |
|
33 |
except Exception as e:
|
34 |
print("Error during prediction:", str(e))
|