fffiloni commited on
Commit
293b33a
1 Parent(s): 15e1845

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -143,17 +143,18 @@ def infer(video_in):
143
  print(extracted_audio)
144
 
145
  # Get description of audio content
146
- audio_content_described = get_salmonn(extracted_audio)
147
 
148
  # Assemble captions
149
- formatted_captions = f"""
150
  ### Visual events:\n{string_list}\n ### Audio events:\n{audio_content_described}
151
  """
152
  print(formatted_captions)
153
 
154
  # Send formatted captions to LLM
155
  #video_description_from_llm = llm_process(formatted_captions)
156
- return formatted_captions
 
157
 
158
  with gr.Blocks() as demo :
159
  with gr.Column(elem_id="col-container"):
@@ -162,7 +163,7 @@ with gr.Blocks() as demo :
162
  """)
163
  video_in = gr.Video(label="Video input")
164
  submit_btn = gr.Button("Submit")
165
- video_description = gr.Textbox(label="Video description")
166
  submit_btn.click(
167
  fn = infer,
168
  inputs = [video_in],
 
143
  print(extracted_audio)
144
 
145
  # Get description of audio content
146
+ #audio_content_described = get_salmonn(extracted_audio)
147
 
148
  # Assemble captions
149
+ '''formatted_captions = f"""
150
  ### Visual events:\n{string_list}\n ### Audio events:\n{audio_content_described}
151
  """
152
  print(formatted_captions)
153
 
154
  # Send formatted captions to LLM
155
  #video_description_from_llm = llm_process(formatted_captions)
156
+ '''
157
+ return extracted_audio
158
 
159
  with gr.Blocks() as demo :
160
  with gr.Column(elem_id="col-container"):
 
163
  """)
164
  video_in = gr.Video(label="Video input")
165
  submit_btn = gr.Button("Submit")
166
+ video_description = gr.Audio(label="Video description")
167
  submit_btn.click(
168
  fn = infer,
169
  inputs = [video_in],