Lenylvt commited on
Commit
15f9ce8
·
verified ·
1 Parent(s): 3327f34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -39,12 +39,24 @@ def video_demo(video, subtitle, subtitle_type, subtitle_language):
39
  else:
40
  return video
41
 
 
 
 
 
 
 
 
 
 
 
42
  demo = gr.Interface(
43
  fn=video_demo,
 
 
44
  inputs=[
45
  gr.Video(label="Video", interactive=True),
46
  gr.File(label="Subtitle", file_types=[".srt", ".vtt"]),
47
- gr.Radio(choices=["Hard"], label="Subtitle Type"),
48
  gr.Textbox(label="Subtitle Language (ISO 639-1 code, e.g., 'en' for English)"),
49
  ],
50
  outputs=gr.Video(label="Processed Video"),
 
39
  else:
40
  return video
41
 
42
+ # Interface improvements
43
+ description = """
44
+ ### Video Subtitler API
45
+ Easily add subtitles to your videos with our tool. For web use, please visit [this space](https://huggingface.co/spaces/Lenylvt/SRT_to_Video).
46
+
47
+ **Subtitle Type Explained:**
48
+ - **Hard**: Subtitles are permanently embedded into the video. Ideal for ensuring compatibility across all players.
49
+ - **Soft**: Subtitles are added as a separate track. This allows viewers to toggle subtitles on or off as needed.
50
+ """
51
+
52
  demo = gr.Interface(
53
  fn=video_demo,
54
+ title="Video Subtitler API",
55
+ description=description,
56
  inputs=[
57
  gr.Video(label="Video", interactive=True),
58
  gr.File(label="Subtitle", file_types=[".srt", ".vtt"]),
59
+ gr.Radio(choices=["Hard", "Soft"], label="Subtitle Type"),
60
  gr.Textbox(label="Subtitle Language (ISO 639-1 code, e.g., 'en' for English)"),
61
  ],
62
  outputs=gr.Video(label="Processed Video"),