LuisBlanche commited on
Commit
7ed9b81
1 Parent(s): e96e97f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import tempfile
5
  import re
6
  import os
7
  from io import BytesIO
8
-
9
  import mechanicalsoup
10
  import pandas as pd
11
  import requests
@@ -303,7 +303,7 @@ def generate_poster(deputy_name, message_1, message_2, vote_list):
303
  static_dir = '/data'
304
  os.makedirs(static_dir, exist_ok=True)
305
  static_pdf_path = os.path.join(static_dir, pdf_filename)
306
- os.rename(pdf_filename, static_pdf_path)
307
 
308
  # Create the iframe HTML to display the PDF
309
  iframe_html = f'<iframe src="file/{static_pdf_path}" width="100%" height="800px"></iframe>'
 
5
  import re
6
  import os
7
  from io import BytesIO
8
+ import shutil
9
  import mechanicalsoup
10
  import pandas as pd
11
  import requests
 
303
  static_dir = '/data'
304
  os.makedirs(static_dir, exist_ok=True)
305
  static_pdf_path = os.path.join(static_dir, pdf_filename)
306
+ shutil.move(pdf_filename, static_pdf_path)
307
 
308
  # Create the iframe HTML to display the PDF
309
  iframe_html = f'<iframe src="file/{static_pdf_path}" width="100%" height="800px"></iframe>'