Khalida1w commited on
Commit
28476c6
1 Parent(s): 297c2d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -70,11 +70,9 @@ def process_video(video_path, output_option):
70
  video_input = gr.Video()
71
  output_option_input = gr.Radio(choices=["Count", "Video", "Both"], label="Select output type")
72
 
73
- # Define examples for the interface
74
  examples = [
75
- [os.path.abspath("example_video1.mp4"), "Count"],
76
- [os.path.abspath("example_video2.mp4"), "Video"],
77
- [os.path.abspath("example_video3.mp4"), "Both"]
78
  ]
79
 
80
  video_interface = gr.Interface(
@@ -86,7 +84,8 @@ video_interface = gr.Interface(
86
  article="""<div>
87
  <p style="text-align: center">Upload a video file and select the type of output you want: object count, processed video, or both. Then, hit submit to process the video.</p>
88
  </div>""",
89
- examples=examples
 
90
  )
91
 
92
  # Deploy the interface with share enabled
 
70
  video_input = gr.Video()
71
  output_option_input = gr.Radio(choices=["Count", "Video", "Both"], label="Select output type")
72
 
73
+ # Define a single example for the interface
74
  examples = [
75
+ [os.path.abspath("example_video1.mp4"), "Both"]
 
 
76
  ]
77
 
78
  video_interface = gr.Interface(
 
84
  article="""<div>
85
  <p style="text-align: center">Upload a video file and select the type of output you want: object count, processed video, or both. Then, hit submit to process the video.</p>
86
  </div>""",
87
+ examples=examples,
88
+ cache_examples=True # Disable caching to speed up launch
89
  )
90
 
91
  # Deploy the interface with share enabled