Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,8 @@ def run_model_pipeline(model, original_image, comparison_image, threshold=0.5):
|
|
109 |
# convert to tensors and add batch dimensions to match model input shape
|
110 |
img1_tensor = torch.unsqueeze(torch.as_tensor(img1), 0)
|
111 |
img2_tensor = torch.unsqueeze(torch.as_tensor(img2), 0)
|
112 |
-
|
|
|
113 |
# Get model embeddings/probabilites
|
114 |
output1, output2 = model(img1_tensor, img2_tensor)
|
115 |
st.success('outputs extracted')
|
@@ -147,9 +148,9 @@ def run_model_pipeline(model, original_image, comparison_image, threshold=0.5):
|
|
147 |
st.write("Please upload both the original and comparison signatures.")
|
148 |
|
149 |
# Run the model pipeline if a button is clicked
|
150 |
-
if st.button("Run Model Pipeline"):
|
151 |
model = load_pipeline()
|
152 |
|
153 |
# button click to process images
|
154 |
-
if st.button("Process Images"):
|
155 |
run_model_pipeline(model, original_image, comparison_image)
|
|
|
109 |
# convert to tensors and add batch dimensions to match model input shape
|
110 |
img1_tensor = torch.unsqueeze(torch.as_tensor(img1), 0)
|
111 |
img2_tensor = torch.unsqueeze(torch.as_tensor(img2), 0)
|
112 |
+
st.success('images loaded')
|
113 |
+
|
114 |
# Get model embeddings/probabilites
|
115 |
output1, output2 = model(img1_tensor, img2_tensor)
|
116 |
st.success('outputs extracted')
|
|
|
148 |
st.write("Please upload both the original and comparison signatures.")
|
149 |
|
150 |
# Run the model pipeline if a button is clicked
|
151 |
+
if st.button("Run Model Pipeline for images"):
|
152 |
model = load_pipeline()
|
153 |
|
154 |
# button click to process images
|
155 |
+
# if st.button("Process Images"):
|
156 |
run_model_pipeline(model, original_image, comparison_image)
|