Spaces:
Runtime error
Runtime error
rongo1
commited on
Commit
·
79dcd5a
1
Parent(s):
888dc01
input error
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from pptx import Presentation
|
|
3 |
from fpdf import FPDF
|
4 |
import tempfile
|
5 |
import os
|
|
|
6 |
|
7 |
def pptx_to_pdf(pptx_file):
|
8 |
# Create a temporary directory to store intermediate images
|
@@ -30,8 +31,8 @@ def pptx_to_pdf(pptx_file):
|
|
30 |
# Create a Gradio interface
|
31 |
iface = gr.Interface(
|
32 |
fn=pptx_to_pdf,
|
33 |
-
inputs=gr.
|
34 |
-
outputs=gr.
|
35 |
title="PPTX to PDF Converter",
|
36 |
description="Upload a PowerPoint file to convert it to a PDF without watermarks."
|
37 |
)
|
|
|
3 |
from fpdf import FPDF
|
4 |
import tempfile
|
5 |
import os
|
6 |
+
from PIL import Image
|
7 |
|
8 |
def pptx_to_pdf(pptx_file):
|
9 |
# Create a temporary directory to store intermediate images
|
|
|
31 |
# Create a Gradio interface
|
32 |
iface = gr.Interface(
|
33 |
fn=pptx_to_pdf,
|
34 |
+
inputs=gr.File(file_types=[".pptx"]),
|
35 |
+
outputs=gr.File(file_types=[".pdf"]),
|
36 |
title="PPTX to PDF Converter",
|
37 |
description="Upload a PowerPoint file to convert it to a PDF without watermarks."
|
38 |
)
|