Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def process_youtube_url(url, language):
|
|
| 19 |
chunks = text_splitter.split_text(text)
|
| 20 |
|
| 21 |
max_textboxes = 10
|
| 22 |
-
output_textboxes = [gr.Textbox(label=f"Chunk {i
|
| 23 |
output_textboxes += [gr.Textbox(visible=False) for _ in range(max_textboxes - len(chunks))]
|
| 24 |
|
| 25 |
return output_textboxes, [], "", char_count
|
|
|
|
| 19 |
chunks = text_splitter.split_text(text)
|
| 20 |
|
| 21 |
max_textboxes = 10
|
| 22 |
+
output_textboxes = [gr.Textbox(label=f"Chunk {i}", value=chunk, show_copy_button=True, visible=True) for i, chunk in enumerate(chunks[:max_textboxes])]
|
| 23 |
output_textboxes += [gr.Textbox(visible=False) for _ in range(max_textboxes - len(chunks))]
|
| 24 |
|
| 25 |
return output_textboxes, [], "", char_count
|