oscarfu0501 commited on
Commit
cb80938
1 Parent(s): eeaeb0e

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -4
handler.py CHANGED
@@ -8,17 +8,17 @@ import os
8
  import gdown
9
  from PIL import Image
10
  import io
11
- import http.client
12
 
13
- http.client.HTTPConnection._http_vsn = 10
14
- http.client.HTTPConnection._http_vsn_str = 'HTTP/1.0'
15
 
16
  class EndpointHandler:
17
  def __init__(self, path='.'): # pass api key to model
18
  # current_directory = os.getcwd()
19
  # print("Current working directory:", current_directory)
20
 
21
- url = "https://drive.google.com/file/d/1jB8sDYYOTfuF7B1PMcDjkm5R7huv97Wm/view?usp=sharing"
22
  gdown.download(url, './best.pt', quiet=False)
23
 
24
  self.model = YOLO("./best.pt")
 
8
  import gdown
9
  from PIL import Image
10
  import io
11
+ # import http.client
12
 
13
+ # http.client.HTTPConnection._http_vsn = 10
14
+ # http.client.HTTPConnection._http_vsn_str = 'HTTP/1.0'
15
 
16
  class EndpointHandler:
17
  def __init__(self, path='.'): # pass api key to model
18
  # current_directory = os.getcwd()
19
  # print("Current working directory:", current_directory)
20
 
21
+ url = "https://drive.google.com/file/d/1jB8sDYYOTfuF7B1PMcDjkm5R7huv97Wm"
22
  gdown.download(url, './best.pt', quiet=False)
23
 
24
  self.model = YOLO("./best.pt")