HussainLatiff commited on
Commit
29b136c
Β·
verified Β·
1 Parent(s): 875ca32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,7 +5,7 @@ import AzureBlobStorageVideo
5
  import AzureBlobStorageAudio
6
 
7
 
8
- def predict_video(input_video, input_audio=None, input_choice="Explosion"):
9
  global filename, file_size # Use the global keyword to refer to the global variables
10
 
11
  # Check if the video is available
@@ -76,7 +76,7 @@ with gr.Blocks(css=css) as demo:
76
  audio_in = gr.File(label="Optional: Upload an Audio Track", file_types=[".mp3"])
77
  with gr.Column():
78
  choice_in = gr.Dropdown(
79
- ["Explosions", "Lightning and Tunder", "Vehicle Racing"],value=callable(""),
80
  label="Choose", info="Haptic Audio will be added for the selected instance in a video"
81
  )
82
  with gr.Row():
@@ -87,11 +87,11 @@ with gr.Blocks(css=css) as demo:
87
  text_out = gr.Textbox(label="Output Text")
88
 
89
  gr.Examples(
90
- examples=[["video/test1.mp4","video/audioTrack.mp3"]],
91
  fn=predict_video,
92
  inputs=[video_in, audio_in,choice_in],
93
  outputs=[video_out, text_out],
94
- cache_examples=True # Cache examples for faster loading
95
  )
96
 
97
  btn_in.click(
 
5
  import AzureBlobStorageAudio
6
 
7
 
8
+ def predict_video(input_video, input_audio=None, input_choice="Explosions"):
9
  global filename, file_size # Use the global keyword to refer to the global variables
10
 
11
  # Check if the video is available
 
76
  audio_in = gr.File(label="Optional: Upload an Audio Track", file_types=[".mp3"])
77
  with gr.Column():
78
  choice_in = gr.Dropdown(
79
+ ["Explosions", "Lightning and Thunder", "Vehicle Racing"],value=callable(""),
80
  label="Choose", info="Haptic Audio will be added for the selected instance in a video"
81
  )
82
  with gr.Row():
 
87
  text_out = gr.Textbox(label="Output Text")
88
 
89
  gr.Examples(
90
+ examples=[[video_1,audio_1]],
91
  fn=predict_video,
92
  inputs=[video_in, audio_in,choice_in],
93
  outputs=[video_out, text_out],
94
+ #cache_examples=True # Cache examples for faster loading
95
  )
96
 
97
  btn_in.click(