Initial commit

This commit is contained in:
2025-11-23 18:03:01 -08:00
commit 68b9adef1a
14 changed files with 423 additions and 0 deletions

12
app/model.py Normal file
View File

@@ -0,0 +1,12 @@
from keras import models, layers
import numpy as np
model = models.load_model("model/shape_model.keras")
labels = ["circle ○", "rectangle ▭", "square □", "triangle △"]
def run_model(image):
img = np.expand_dims(image, axis=0)
prediction = np.argmax(model.predict(img))
return labels[prediction]
if __name__=="__main__":
print(run_model(input("Image path: ")))