ChiBenevisamPas commited on
Commit
536f4b9
·
verified ·
1 Parent(s): 2c70bf9

Update Def PDF 3

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -100,11 +100,12 @@ def write_pdf(transcription, output_file, tokenizer=None, translation_model=None
100
  pdf = FPDF()
101
  pdf.set_auto_page_break(auto=True, margin=15)
102
  pdf.add_page()
103
- pdf.set_font("Arial", size=12)
104
-
105
- for i, segment in enumerate(transcription['segments']):
106
 
 
 
 
107
 
 
108
  text = segment['text']
109
 
110
  if translation_model:
 
100
  pdf = FPDF()
101
  pdf.set_auto_page_break(auto=True, margin=15)
102
  pdf.add_page()
 
 
 
103
 
104
+ # Use a Unicode font like DejaVuSans that supports a wide range of characters
105
+ pdf.add_font('DejaVu', '', '/path/to/DejaVuSans.ttf', uni=True)
106
+ pdf.set_font("DejaVu", size=12)
107
 
108
+ for i, segment in enumerate(transcription['segments']):
109
  text = segment['text']
110
 
111
  if translation_model: