Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1249,9 +1249,14 @@ def create_pdf(name,id):
|
|
1249 |
"Print Name and Title": name
|
1250 |
},
|
1251 |
)
|
1252 |
-
output_file_name = f"documents\\{name}.pdf"
|
|
|
1253 |
with open(output_file_name, "wb+") as output:
|
1254 |
output.write(filled.read())
|
|
|
|
|
|
|
|
|
1255 |
return f"{output_file_name} is created successfully."
|
1256 |
|
1257 |
|
|
|
1249 |
"Print Name and Title": name
|
1250 |
},
|
1251 |
)
|
1252 |
+
#output_file_name = f"documents\\{name}.pdf"
|
1253 |
+
output_file_name = f"{name}.pdf"
|
1254 |
with open(output_file_name, "wb+") as output:
|
1255 |
output.write(filled.read())
|
1256 |
+
|
1257 |
+
repo_id = "Redmind/NewageNXTGPT"
|
1258 |
+
file_output=f"output/{output_file_name}"
|
1259 |
+
api.upload_file(path_or_fileobj=output_file_name, repo_id=repo_id, repo_type= "space", path_in_repo=file_output)
|
1260 |
return f"{output_file_name} is created successfully."
|
1261 |
|
1262 |
|