Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import tempfile
|
|
| 3 |
from typing import List
|
| 4 |
import gradio as gr
|
| 5 |
from PyPDF2 import PdfReader, PdfWriter
|
| 6 |
-
import pikepdf
|
| 7 |
|
| 8 |
# Load custom CSS
|
| 9 |
with open(os.path.join(os.path.dirname(__file__), "fancy.css")) as f:
|
|
@@ -125,4 +125,4 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 125 |
btn_c.click(do_compress, [comp_file,method,quality], [out_c,err_c,err_c])
|
| 126 |
|
| 127 |
if __name__ == "__main__":
|
| 128 |
-
demo.launch(server_name="0.0.0.0",
|
|
|
|
| 3 |
from typing import List
|
| 4 |
import gradio as gr
|
| 5 |
from PyPDF2 import PdfReader, PdfWriter
|
| 6 |
+
import pikepdf
|
| 7 |
|
| 8 |
# Load custom CSS
|
| 9 |
with open(os.path.join(os.path.dirname(__file__), "fancy.css")) as f:
|
|
|
|
| 125 |
btn_c.click(do_compress, [comp_file,method,quality], [out_c,err_c,err_c])
|
| 126 |
|
| 127 |
if __name__ == "__main__":
|
| 128 |
+
demo.launch(server_name="0.0.0.0", server_port=int(os.environ.get("PORT",7860)))
|