Lenylvt commited on
Commit
04ff24d
·
verified ·
1 Parent(s): d4af723

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.read()
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