eho69 commited on
Commit
f986443
·
verified ·
1 Parent(s): e01f29b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -41
app.py CHANGED
@@ -1,44 +1,3 @@
1
- # import gradio as gr
2
- # import cv2
3
- # import numpy as np
4
- # from inspector_engine import AdvancedBlockInspector
5
-
6
- # # Initialize your engine
7
- # inspector = AdvancedBlockInspector()
8
-
9
- # def inspect(image):
10
- # if image is None:
11
- # return None, "No image uploaded"
12
-
13
- # # Gradio provides images in RGB, your engine uses BGR (OpenCV)
14
- # frame = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR)
15
-
16
- # # Run your existing inspection logic
17
- # result = inspector.inspect_block(frame)
18
-
19
- # # Generate the visualization using your existing method
20
- # vis_frame = inspector.visualize_results(frame, result)
21
-
22
- # # Convert back to RGB for Gradio display
23
- # vis_rgb = cv2.cvtColor(vis_frame, cv2.COLOR_BGR2RGB)
24
-
25
- # # Return visualized image and JSON data
26
- # return vis_rgb, result.to_dict()
27
-
28
- # # Create the Interface
29
- # demo = gr.Interface(
30
- # fn=inspect,
31
- # inputs=gr.Image(type="numpy", label="Upload Engine Block Image"),
32
- # outputs=[
33
- # gr.Image(type="numpy", label="AI Analysis"),
34
- # gr.JSON(label="Inspection Data")
35
- # ],
36
- # title="Industrial Engine Saddle Inspector",
37
- # description="Uploading an image here will trigger YOLO-OBB and ResNet-18 analysis."
38
- # )
39
-
40
- # if __name__ == "__main__":
41
- # demo.launch()
42
  import gradio as gr
43
  import cv2
44
  import numpy as np
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import cv2
3
  import numpy as np