Samariddin Kushmuratov commited on
Commit
b0fe78c
1 Parent(s): 8affd3f
Files changed (2) hide show
  1. app.py +9 -8
  2. assets/result_imgs/00028.jpg +0 -0
app.py CHANGED
@@ -46,7 +46,8 @@ def predict(video_path):
46
  get_car_numbers(_path)
47
  images = glob.glob(f'{_path_RES}/*.jpg')
48
  # # selected_images = [images[0],images[len(images)//2],images[-1]]
49
- return problem+good, problem, good,images
 
50
  # return 0, 0, 0, images
51
 
52
 
@@ -55,20 +56,20 @@ my_example = [
55
  # ['video/vid_39_1284-2_1174.mp4']
56
  ]
57
 
58
- my_title = "Video Klassifikatsiya"
59
- my_description = "128-4 qoida `To’xtash chizig’ini bosish` bo'yicha video analiz"
60
- all_frame = Textbox(label="Umumiy framelar soni")
61
- problem_frame = Textbox(label="Muammoli framelar soni")
62
- good_frame = Textbox(label="Muammosiz framelar soni")
63
 
64
- problem_frames = Gallery(label="Muammoli rasmlar", elem_id="gallery").style(
 
 
 
65
  grid=[3], height="auto"
66
  )
67
  input_video = Video(label="Kiruvchi video") # Create input video component
68
 
69
  gr.Interface(fn=predict,
70
  inputs=input_video,
71
- outputs=[all_frame,problem_frame,good_frame,problem_frames],
72
  title=my_title,
73
  examples=my_example,
74
  description=my_description).launch()
 
46
  get_car_numbers(_path)
47
  images = glob.glob(f'{_path_RES}/*.jpg')
48
  # # selected_images = [images[0],images[len(images)//2],images[-1]]
49
+ res_txt = f"{problem}/{problem+good}"
50
+ return res_txt,images
51
  # return 0, 0, 0, images
52
 
53
 
 
56
  # ['video/vid_39_1284-2_1174.mp4']
57
  ]
58
 
59
+ my_title = "To’xtash chizig’i bosilgan kadrlarni topish (modda:128-4)"
60
+ my_description = """
 
 
 
61
 
62
+ """
63
+ all_frame = Textbox(label="Topilgan kadrlar / Umumiy kadrlar")
64
+
65
+ problem_frames = Gallery(label="Muammoli kadrlar", elem_id="gallery").style(
66
  grid=[3], height="auto"
67
  )
68
  input_video = Video(label="Kiruvchi video") # Create input video component
69
 
70
  gr.Interface(fn=predict,
71
  inputs=input_video,
72
+ outputs=[all_frame,problem_frames],
73
  title=my_title,
74
  examples=my_example,
75
  description=my_description).launch()
assets/result_imgs/00028.jpg CHANGED