Haiss123 commited on
Commit
a898069
·
verified ·
1 Parent(s): f97665b

Update detection_api.py

Browse files
Files changed (1) hide show
  1. detection_api.py +12 -1
detection_api.py CHANGED
@@ -41,7 +41,18 @@ app.add_middleware(
41
  allow_headers=["*"],
42
  )
43
 
44
-
 
 
 
 
 
 
 
 
 
 
 
45
  # Configuration
46
  class Config:
47
  UPLOAD_DIR = Path("uploads")
 
41
  allow_headers=["*"],
42
  )
43
 
44
+ lass StandaloneApplication(BaseApplication):
45
+ def __init__(self, app, options=None):
46
+ self.application = app
47
+ self.options = options or {}
48
+ super().__init__()
49
+
50
+ def load_config(self):
51
+ for key, value in self.options.items():
52
+ self.cfg.set(key, value)
53
+
54
+ def load(self):
55
+ return self.application
56
  # Configuration
57
  class Config:
58
  UPLOAD_DIR = Path("uploads")