bluestarburst commited on
Commit
db8cbef
1 Parent(s): a76cfe3

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. handler.py +2 -1
  2. requirements.txt +0 -0
handler.py CHANGED
@@ -6,6 +6,7 @@ from omegaconf import OmegaConf
6
  from huggingface_hub import hf_hub_download, try_to_load_from_cache
7
 
8
  import os
 
9
 
10
  from diffusers.utils.import_utils import is_xformers_available
11
  from typing import Any
@@ -109,7 +110,7 @@ class EndpointHandler():
109
  with open(path, mode="rb") as file:
110
  fileContent = file.read()
111
  # return json response with binary data
112
- return fileContent
113
 
114
 
115
  # This is the entry point for the serverless function.
 
6
  from huggingface_hub import hf_hub_download, try_to_load_from_cache
7
 
8
  import os
9
+ import json
10
 
11
  from diffusers.utils.import_utils import is_xformers_available
12
  from typing import Any
 
110
  with open(path, mode="rb") as file:
111
  fileContent = file.read()
112
  # return json response with binary data
113
+ return json.loads(fileContent)
114
 
115
 
116
  # This is the entry point for the serverless function.
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ