Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
212 |
-
if os.path.exists(output_path):
|
213 |
-
|
214 |
-
else:
|
215 |
-
|
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"),
|