Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,8 @@ def translate_line(line, temperature=0.9, max_new_tokens=256, top_p=0.95, repeti
|
|
28 |
return output
|
29 |
|
30 |
def translate_srt(file_info):
|
31 |
-
#
|
32 |
-
content = file_info.decode("utf-8") # Decode content from bytes to string
|
33 |
translated_lines = []
|
34 |
for line in parse_srt(content):
|
35 |
translated_line = translate_line(line)
|
|
|
28 |
return output
|
29 |
|
30 |
def translate_srt(file_info):
|
31 |
+
# Correctly access the file content from the file_info dictionary
|
32 |
+
content = file_info["content"].decode("utf-8") # Decode content from bytes to string
|
33 |
translated_lines = []
|
34 |
for line in parse_srt(content):
|
35 |
translated_line = translate_line(line)
|