awacke1 commited on
Commit
415515c
·
verified ·
1 Parent(s): d1abb06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,6 @@
1
  #!/usr/bin/env python3
2
  import os
 
3
  import streamlit as st
4
  from PIL import Image
5
  import torch
@@ -72,8 +73,7 @@ def load_image_gen():
72
  return pipeline
73
 
74
  def load_line_drawer():
75
- # Simplified from your Torch Space (assuming a UNet-like model for edge detection)
76
- # Placeholder: Using OpenCV edge detection as a minimal CPU example
77
  def edge_detection(image):
78
  img_np = np.array(image.convert("RGB"))
79
  gray = cv2.cvtColor(img_np, cv2.COLOR_RGB2GRAY)
 
1
  #!/usr/bin/env python3
2
  import os
3
+ import glob # Added missing import
4
  import streamlit as st
5
  from PIL import Image
6
  import torch
 
73
  return pipeline
74
 
75
  def load_line_drawer():
76
+ # Simplified OpenCV-based edge detection (CPU-friendly substitute for Torch Space UNet)
 
77
  def edge_detection(image):
78
  img_np = np.array(image.convert("RGB"))
79
  gray = cv2.cvtColor(img_np, cv2.COLOR_RGB2GRAY)