qsitj commited on
Commit
1c2ba93
·
verified ·
1 Parent(s): e1fe61e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -36,6 +36,7 @@ if torch.cuda.is_available():
36
  detector50.model.to('cuda')
37
  detector101.model.to('cuda')
38
 
 
39
 
40
  COLORS = ["#ff7f7f", "#ff7fbf", "#ff7fff", "#bf7fff",
41
  "#7f7fff", "#7fbfff", "#7fffff", "#7fffbf",
@@ -69,7 +70,7 @@ def get_figure(in_pil_img):
69
 
70
  ax = plt.gca()
71
  print(f"图像尺寸:{in_pil_img.size}")
72
- in_results = query_data(in_pil_img)
73
 
74
  for prediction in in_results:
75
  selected_color = choice(COLORS)
 
36
  detector50.model.to('cuda')
37
  detector101.model.to('cuda')
38
 
39
+ model = "detr-resnet-101"
40
 
41
  COLORS = ["#ff7f7f", "#ff7fbf", "#ff7fff", "#bf7fff",
42
  "#7f7fff", "#7fbfff", "#7fffff", "#7fffbf",
 
70
 
71
  ax = plt.gca()
72
  print(f"图像尺寸:{in_pil_img.size}")
73
+ in_results = query_data(model, in_pil_img)
74
 
75
  for prediction in in_results:
76
  selected_color = choice(COLORS)