asimonoff1101 commited on
Commit
5f9eaf9
·
1 Parent(s): d0f9d05

omg typing

Browse files
Files changed (2) hide show
  1. src/main.py +5 -5
  2. staging/brand-classifier-stage +1 -0
src/main.py CHANGED
@@ -36,7 +36,7 @@ OUTPUT_DIR = "magellan-ai/brand-classifier-stage"
36
  print('logging in')
37
  login(token=HF_ACCESS_TOKEN)
38
  print('logged in')
39
-
40
  print(f"Is CUDA available: {torch.cuda.is_available()}")
41
  # True
42
  print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
@@ -46,7 +46,7 @@ print('setting device')
46
  device = torch.device("cuda")
47
  print(device)
48
  print('set device')
49
-
50
  print('setting up Repository')
51
  #TODO: Change based on whether input dir is stage to output to prod or other way
52
  repo = hf.Repository(local_dir = REPOSITORY_PATH,
@@ -68,9 +68,9 @@ async def home():
68
  async def post_webhook(
69
  payload: WebhookPayload,
70
  task_queue: BackgroundTasks,
71
- repo: repo,
72
- REPOSITORY_PATH: REPOSITORY_PATH,
73
- OUTPUT_DIR: OUTPUT_DIR,
74
  x_webhook_secret: Optional[str] = Header(default=None),
75
  ):
76
  print('received webhook:')
 
36
  print('logging in')
37
  login(token=HF_ACCESS_TOKEN)
38
  print('logged in')
39
+ """
40
  print(f"Is CUDA available: {torch.cuda.is_available()}")
41
  # True
42
  print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
 
46
  device = torch.device("cuda")
47
  print(device)
48
  print('set device')
49
+ """
50
  print('setting up Repository')
51
  #TODO: Change based on whether input dir is stage to output to prod or other way
52
  repo = hf.Repository(local_dir = REPOSITORY_PATH,
 
68
  async def post_webhook(
69
  payload: WebhookPayload,
70
  task_queue: BackgroundTasks,
71
+ repo = repo,
72
+ REPOSITORY_PATH: str = REPOSITORY_PATH,
73
+ OUTPUT_DIR: str = OUTPUT_DIR,
74
  x_webhook_secret: Optional[str] = Header(default=None),
75
  ):
76
  print('received webhook:')
staging/brand-classifier-stage ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit ce7a7c6ec3cc85c4695d2835623dff0fec95a2ff