Spaces:
Runtime error
Runtime error
Update core/input_handler.py
Browse files- core/input_handler.py +14 -13
core/input_handler.py
CHANGED
|
@@ -1,16 +1,17 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
def fetch_media_from_url(url):
|
|
|
|
| 1 |
+
import logging
|
| 2 |
+
import os
|
| 3 |
+
import io
|
| 4 |
+
import tempfile
|
| 5 |
+
import requests
|
| 6 |
+
from PIL import Image
|
| 7 |
+
import cv2
|
| 8 |
+
from urllib.parse import urlparse
|
| 9 |
+
import socket
|
| 10 |
+
import ipaddress
|
| 11 |
+
|
| 12 |
+
# Setup logging
|
| 13 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
| 14 |
+
logger = logging.getLogger(__name__)
|
| 15 |
|
| 16 |
|
| 17 |
def fetch_media_from_url(url):
|