add changes in pdf logic
changes: 1. Remove `/` file (just missed click when create it); 2. Add filename input for pdf; 3. Now pdf file saves.
This commit is contained in:
@@ -13,9 +13,9 @@ class ConvertMdToPdf:
|
||||
text,
|
||||
flags=re.DOTALL
|
||||
)
|
||||
pdf = MarkdownPdf(toc_level=2, optimize=True)
|
||||
pdf = MarkdownPdf(toc_level=0, optimize=True)
|
||||
pdf.add_section(Section(text))
|
||||
return text
|
||||
return pdf, text
|
||||
|
||||
def replace_math(self, match):
|
||||
math_content = match.group(1) or match.group(2) # $$...$$ или $...$
|
||||
|
||||
@@ -2,7 +2,7 @@ from faster_whisper import WhisperModel
|
||||
|
||||
class FasterWhisper:
|
||||
def recognize(self, model, audioFile, beamSize, vadFilter, minSilenceDurationMs, speechPadMs, temp0, temp1, temp2, wordTimestamps, noSpeechThreshold, conditionOnPreviousText):
|
||||
model = WhisperModel(model, device='auto', compute_type='auto') # Задаем модель
|
||||
model = WhisperModel(model, device='cuda', compute_type='auto') # Задаем модель
|
||||
|
||||
segments, _ = model.transcribe( # Распознаем текст
|
||||
audioFile,
|
||||
|
||||
Reference in New Issue
Block a user