Преглед изворни кода

Merge pull request #12 from dongxuecheng/dxc/basic_frame

增加post demo
Xuecheng Dong пре 7 месеци
родитељ
комит
9061920ddc
2 измењених фајлова са 12 додато и 1 уклоњено
  1. 1 1
      compressed_oxygen_detect.py
  2. 11 0
      post_demo1.py

+ 1 - 1
compressed_oxygen_detect.py

@@ -113,7 +113,7 @@ def process_video(model_path, video_source, start_event):
                         steps[5]=True
                         print("steps[5]:",steps[5])
                 
-                if step4_flag and not air_make_up_flag :
+                if step4_flag and not air_make_up_flag and steps[3]:
                     steps[4]=True
                     print("steps[4]:",steps[4])
 

+ 11 - 0
post_demo1.py

@@ -0,0 +1,11 @@
+import requests
+
+url = 'http://127.0.0.1:5007/compressed_oxygen_status'
+
+
+response = requests.get(url)
+
+if response.status_code == 200:
+    print(response.text)
+else:
+    print(response.text)