Update app.py
Browse files
app.py
CHANGED
|
@@ -153,3 +153,16 @@ def translate(file, max_chars):
|
|
| 153 |
|
| 154 |
return subtitle_file
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
return subtitle_file
|
| 155 |
|
| 156 |
+
with gr.Blocks() as demo:
|
| 157 |
+
gr.Markdown("Start typing below and then click **Run** to see the progress and final output.")
|
| 158 |
+
with gr.Column():
|
| 159 |
+
srt_file = gr.File()
|
| 160 |
+
subtitle_file = gr.File()
|
| 161 |
+
btn = gr.Button("Create")
|
| 162 |
+
btn.click(
|
| 163 |
+
fn=translate,
|
| 164 |
+
inputs=srt_file,
|
| 165 |
+
outputs=subtitle_file,
|
| 166 |
+
)
|
| 167 |
+
|
| 168 |
+
demo.launch(debug=True)
|