nathanjc commited on
Commit
0fd96a3
·
1 Parent(s): d02d459

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -204,15 +204,15 @@ class options:
204
 
205
  def get_output(image):
206
  image.save(f"{BASE_DIR}/input/image.jpg")
207
- source = f"{BASE_DIR}/input"
208
- opt = options(weights='logo_detection.pt',source=source)
209
- bbox = None
210
- with torch.no_grad():
211
- bbox,output_path = detect(opt)
212
- if os.path.exists(output_path):
213
- return np.array(Image.open(output_path))
214
- else:
215
- return np.array(image)
216
 
217
  gr.Interface(fn=get_output,
218
  inputs=gr.Image(type = "pil", label="Your image"),
 
204
 
205
  def get_output(image):
206
  image.save(f"{BASE_DIR}/input/image.jpg")
207
+ # source = f"{BASE_DIR}/input"
208
+ # opt = options(weights='logo_detection.pt',source=source)
209
+ # bbox = None
210
+ # with torch.no_grad():
211
+ # bbox,output_path = detect(opt)
212
+ # if os.path.exists(output_path):
213
+ # return np.array(Image.open(output_path))
214
+ # else:
215
+ return np.array(image)
216
 
217
  gr.Interface(fn=get_output,
218
  inputs=gr.Image(type = "pil", label="Your image"),