jomasego commited on
Commit
5cee17f
·
1 Parent(s): 0e60614

Further update UI text for general video interpretation

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -244,11 +244,12 @@ def process_video_input(input_string: str) -> Dict[str, Any]:
244
  # Gradio Interface for the API endpoint
245
  api_interface = gr.Interface(
246
  fn=process_video_input,
247
- inputs=gr.Textbox(label="Video URL or Local File Path for Transcription",
248
  placeholder="Enter YouTube URL, direct video URL (.mp4, .mov, etc.), or local file path..."),
249
  outputs=gr.JSON(label="API Response"),
250
- title="Video Transcription API",
251
- description="Provide a video URL or local file path to get its audio transcription. Output is JSON.",
 
252
  allow_flagging="never",
253
  examples=[
254
  ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
@@ -271,7 +272,8 @@ demo_interface = gr.Interface(
271
  inputs=gr.Textbox(label="Upload Video URL or Local File Path for Demo",
272
  placeholder="Enter YouTube URL, direct video URL (.mp4, .mov, etc.), or local file path..."),
273
  outputs="text",
274
- title="Video Transcription Demo",
 
275
  description="Provide a video URL or local file path to see its transcription status.",
276
  allow_flagging="never"
277
  )
@@ -326,12 +328,12 @@ with gr.Blocks(head=f"<script>{js_code_for_head}</script>") as app:
326
 
327
  with gr.Tab("API Endpoint (for AI Models)"):
328
  gr.Markdown("### Use this endpoint from another application (e.g., another Hugging Face Space).")
329
- gr.Markdown("The `process_video_input` function is exposed here.")
330
  api_interface.render()
331
  gr.Markdown("**Note:** Some YouTube videos may fail to download if they require login or cookie authentication due to YouTube's restrictions. Direct video links are generally more reliable for automated processing.")
332
 
333
  with gr.Tab("Demo (for Manual Testing)"):
334
- gr.Markdown("### Manually test video URLs or paths and observe the response.")
335
  demo_interface.render()
336
 
337
  # Launch the Gradio application
 
244
  # Gradio Interface for the API endpoint
245
  api_interface = gr.Interface(
246
  fn=process_video_input,
247
+ inputs=gr.Textbox(lines=1, label="Video URL or Local File Path for Interpretation"),
248
  placeholder="Enter YouTube URL, direct video URL (.mp4, .mov, etc.), or local file path..."),
249
  outputs=gr.JSON(label="API Response"),
250
+ title="Video Interpretation Input",
251
+ label="Video Interpretation",
252
+ description="Provide a video URL or local file path to get its interpretation status as JSON.",
253
  allow_flagging="never",
254
  examples=[
255
  ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
 
272
  inputs=gr.Textbox(label="Upload Video URL or Local File Path for Demo",
273
  placeholder="Enter YouTube URL, direct video URL (.mp4, .mov, etc.), or local file path..."),
274
  outputs="text",
275
+ title="Video Interpretation Demo",
276
+ label="Video Interpretation Demo",
277
  description="Provide a video URL or local file path to see its transcription status.",
278
  allow_flagging="never"
279
  )
 
328
 
329
  with gr.Tab("API Endpoint (for AI Models)"):
330
  gr.Markdown("### Use this endpoint from another application (e.g., another Hugging Face Space).")
331
+ gr.Markdown("The `process_video_input` function (for video interpretation) is exposed here.")
332
  api_interface.render()
333
  gr.Markdown("**Note:** Some YouTube videos may fail to download if they require login or cookie authentication due to YouTube's restrictions. Direct video links are generally more reliable for automated processing.")
334
 
335
  with gr.Tab("Demo (for Manual Testing)"):
336
+ gr.Markdown("### Manually test video URLs or paths for interpretation and observe the JSON response.")
337
  demo_interface.render()
338
 
339
  # Launch the Gradio application