Unverified Commit c08a86d6 authored by Xiaomeng Zhao's avatar Xiaomeng Zhao Committed by GitHub
Browse files

Update projects/multi_gpu_v2/server.py


Co-authored-by: default avatarCopilot <175728472+Copilot@users.noreply.github.com>
parent 919280aa
...@@ -43,9 +43,9 @@ class MinerUAPI(ls.LitAPI): ...@@ -43,9 +43,9 @@ class MinerUAPI(ls.LitAPI):
options = request.get('options', {}) options = request.get('options', {})
file_bytes = base64.b64decode(file_b64) file_bytes = base64.b64decode(file_b64)
temp_file = Path(tempfile.mktemp(suffix='.pdf')) with tempfile.NamedTemporaryFile(suffix='.pdf', delete=False) as temp:
temp_file.write_bytes(file_bytes) temp.write(file_bytes)
temp_file = Path(temp.name)
return { return {
'input_path': str(temp_file), 'input_path': str(temp_file),
'backend': options.get('backend', 'pipeline'), 'backend': options.get('backend', 'pipeline'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment