Spaces:
Sleeping
Sleeping
Revise for Font PDF
Browse files
app.py
CHANGED
|
@@ -120,7 +120,7 @@ def write_pdf(transcription, output_file, tokenizer=None, translation_model=None
|
|
| 120 |
pdf.add_page()
|
| 121 |
|
| 122 |
# Set up the font for Farsi (Unicode-compliant)
|
| 123 |
-
font_path = "B-NAZANIN.
|
| 124 |
pdf.add_font('B-NAZANIN', '', font_path, uni=True)
|
| 125 |
pdf.set_font('B-NAZANIN', size=12)
|
| 126 |
|
|
@@ -134,7 +134,6 @@ def write_pdf(transcription, output_file, tokenizer=None, translation_model=None
|
|
| 134 |
|
| 135 |
pdf.output(output_file)
|
| 136 |
|
| 137 |
-
|
| 138 |
def write_ppt(transcription, output_file, tokenizer=None, translation_model=None):
|
| 139 |
"""Creates a PowerPoint presentation from the transcription without timestamps."""
|
| 140 |
ppt = Presentation()
|
|
|
|
| 120 |
pdf.add_page()
|
| 121 |
|
| 122 |
# Set up the font for Farsi (Unicode-compliant)
|
| 123 |
+
font_path = "/home/user/app/B-NAZANIN.TTF" # Adjust this path as per your environment
|
| 124 |
pdf.add_font('B-NAZANIN', '', font_path, uni=True)
|
| 125 |
pdf.set_font('B-NAZANIN', size=12)
|
| 126 |
|
|
|
|
| 134 |
|
| 135 |
pdf.output(output_file)
|
| 136 |
|
|
|
|
| 137 |
def write_ppt(transcription, output_file, tokenizer=None, translation_model=None):
|
| 138 |
"""Creates a PowerPoint presentation from the transcription without timestamps."""
|
| 139 |
ppt = Presentation()
|