Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def format_prompt(message, history):
|
|
16 |
def generate_from_srt(file_path, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0):
|
17 |
# Assuming the file content is directly usable as a prompt
|
18 |
with open(file_path, "r", encoding="utf-8") as file:
|
19 |
-
file_content = file.
|
20 |
|
21 |
# Process the SRT file content as needed before using it as a prompt
|
22 |
# For example, extracting text and removing timestamps if necessary
|
|
|
16 |
def generate_from_srt(file_path, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0):
|
17 |
# Assuming the file content is directly usable as a prompt
|
18 |
with open(file_path, "r", encoding="utf-8") as file:
|
19 |
+
file_content = file.load()
|
20 |
|
21 |
# Process the SRT file content as needed before using it as a prompt
|
22 |
# For example, extracting text and removing timestamps if necessary
|