Jyothish CHANDRASENAN commited on
Commit
027b2a8
·
1 Parent(s): f24b53e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -173,7 +173,8 @@ def predict(img):
173
  prediction = infer(preprocessed_img)
174
  keypoints_map, distance_keypoints = postprocessor(prediction, orig_img)
175
  # cv2.imwrite("keypoints_map.png", keypoints_map[:,:,::-1])
176
- display_text = f"The distance between two key points A and B is {distance_keypoints} pixel units"
 
177
  return keypoints_map, display_text
178
 
179
 
@@ -181,5 +182,4 @@ gr.Interface(fn=predict,
181
  inputs=[gr.Image(shape=(224,224),type="filepath")],
182
  outputs=[gr.Image(shape=(224,224)), "text"],
183
  css="footer {visibility: hidden} body}, .gradio-container {background-color: white}",
184
- title="Automi Demo",
185
  examples=["006.png","002.png","003.png","004.png","058.png"]).launch(share=False)
 
173
  prediction = infer(preprocessed_img)
174
  keypoints_map, distance_keypoints = postprocessor(prediction, orig_img)
175
  # cv2.imwrite("keypoints_map.png", keypoints_map[:,:,::-1])
176
+ display_text = f"\nCondensateur détecté \nLa distance entre les 2 pattes est de {distance_keypoints} \nCette côte dimensionnelle est conforme et dans les tolérances"
177
+
178
  return keypoints_map, display_text
179
 
180
 
 
182
  inputs=[gr.Image(shape=(224,224),type="filepath")],
183
  outputs=[gr.Image(shape=(224,224)), "text"],
184
  css="footer {visibility: hidden} body}, .gradio-container {background-color: white}",
 
185
  examples=["006.png","002.png","003.png","004.png","058.png"]).launch(share=False)