Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,8 @@ logging.set_verbosity_error()
|
|
| 15 |
import sys
|
| 16 |
sys.path.append("./Object-Detection/helper.py") # Adjust the path as necessary to point to the directory where helper.py is located
|
| 17 |
|
| 18 |
-
from Object-Detection.helper import ignore_warnings
|
|
|
|
| 19 |
ignore_warnings()
|
| 20 |
|
| 21 |
# Import the pipeline function from the transformers library
|
|
@@ -26,7 +27,9 @@ pipe = pipeline("object-detection", model="facebook/detr-resnet-50")
|
|
| 26 |
|
| 27 |
#sys.path.append("./Open_Source_Models_with_Hugging_Face/Object_Detection/helper.py") # Adjust the path as necessary to point to the directory where helper.py is located
|
| 28 |
|
| 29 |
-
from Object-Detection.helper import import load_image_from_url, render_results_in_image
|
|
|
|
|
|
|
| 30 |
|
| 31 |
# Load the image from a file
|
| 32 |
#raw_image = Image.open('./Open_Source_Models_with_Hugging_Face/Object_Detection/kittens.jpeg')
|
|
|
|
| 15 |
import sys
|
| 16 |
sys.path.append("./Object-Detection/helper.py") # Adjust the path as necessary to point to the directory where helper.py is located
|
| 17 |
|
| 18 |
+
#from Object-Detection.helper import ignore_warnings
|
| 19 |
+
from helper import ignore_warnings
|
| 20 |
ignore_warnings()
|
| 21 |
|
| 22 |
# Import the pipeline function from the transformers library
|
|
|
|
| 27 |
|
| 28 |
#sys.path.append("./Open_Source_Models_with_Hugging_Face/Object_Detection/helper.py") # Adjust the path as necessary to point to the directory where helper.py is located
|
| 29 |
|
| 30 |
+
#from Object-Detection.helper import import load_image_from_url, render_results_in_image
|
| 31 |
+
from helper import load_image_from_url, render_results_in_image
|
| 32 |
+
|
| 33 |
|
| 34 |
# Load the image from a file
|
| 35 |
#raw_image = Image.open('./Open_Source_Models_with_Hugging_Face/Object_Detection/kittens.jpeg')
|