Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -182,6 +182,8 @@ def download_pdf():
|
|
| 182 |
file_path = "dynamic-pricing.pdf"
|
| 183 |
with open(file_path, "wb") as f:
|
| 184 |
f.write(response.content)
|
|
|
|
|
|
|
| 185 |
return file_path
|
| 186 |
|
| 187 |
|
|
@@ -463,7 +465,6 @@ with gr.Blocks(css=load_css(),js=js,title="ダイナミック・プライシン
|
|
| 463 |
|
| 464 |
with gr.Row():
|
| 465 |
if os.path.exists("./dynamic-pricing.pdf"):
|
| 466 |
-
print("File Exists.")
|
| 467 |
pdf_output = PDF(label="資料",value="./dynamic-pricing.pdf")
|
| 468 |
else:
|
| 469 |
download_pdf()
|
|
|
|
| 182 |
file_path = "dynamic-pricing.pdf"
|
| 183 |
with open(file_path, "wb") as f:
|
| 184 |
f.write(response.content)
|
| 185 |
+
|
| 186 |
+
print("File Downloaded.")
|
| 187 |
return file_path
|
| 188 |
|
| 189 |
|
|
|
|
| 465 |
|
| 466 |
with gr.Row():
|
| 467 |
if os.path.exists("./dynamic-pricing.pdf"):
|
|
|
|
| 468 |
pdf_output = PDF(label="資料",value="./dynamic-pricing.pdf")
|
| 469 |
else:
|
| 470 |
download_pdf()
|