Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,27 +5,25 @@ Supports image, video, and URL-based media inputs for detection, segmentation, a
|
|
5 |
Outputs include scene blueprint, structured JSON, and downloadable results.
|
6 |
"""
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
import gradio as gr
|
9 |
from PIL import Image
|
10 |
-
import numpy as np
|
11 |
-
import os
|
12 |
-
import io
|
13 |
-
import zipfile
|
14 |
-
import json
|
15 |
-
import tempfile
|
16 |
-
import logging
|
17 |
import cv2
|
18 |
-
import
|
19 |
-
|
|
|
20 |
from registry import get_model
|
21 |
from core.describe_scene import describe_scene
|
22 |
-
import
|
23 |
-
import
|
24 |
-
import
|
25 |
-
|
26 |
-
import ipaddress
|
27 |
from huggingface_hub import hf_hub_download
|
28 |
-
|
29 |
|
30 |
# Setup logging
|
31 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
|
|
5 |
Outputs include scene blueprint, structured JSON, and downloadable results.
|
6 |
"""
|
7 |
|
8 |
+
|
9 |
+
import time
|
10 |
+
import logging
|
11 |
+
|
12 |
+
|
13 |
import gradio as gr
|
14 |
from PIL import Image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
import cv2
|
16 |
+
import timeout_decorator
|
17 |
+
import spaces
|
18 |
+
|
19 |
from registry import get_model
|
20 |
from core.describe_scene import describe_scene
|
21 |
+
from core.process import process_image
|
22 |
+
from core.input_handler import resolve_input, validate_video, validate_image
|
23 |
+
from utils.helpers import format_error, generate_session_id, toggle_visibility
|
24 |
+
|
|
|
25 |
from huggingface_hub import hf_hub_download
|
26 |
+
|
27 |
|
28 |
# Setup logging
|
29 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|