Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,12 @@ import spaces
|
|
| 2 |
|
| 3 |
# Configure ZeroGPU
|
| 4 |
@spaces.GPU
|
| 5 |
-
def process_video_with_gpu(video, resize_option
|
| 6 |
"""ZeroGPU-accelerated video processing"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
return process_video_core(video, resize_option, assessor)
|
| 8 |
|
| 9 |
import gradio as gr
|
|
@@ -700,7 +704,7 @@ def process_video_core(video, resize_option, assessor):
|
|
| 700 |
# Wrapper function that calls the GPU-accelerated version
|
| 701 |
def process_video(video, resize_option):
|
| 702 |
"""Wrapper function to call GPU-accelerated processing"""
|
| 703 |
-
return process_video_with_gpu(video, resize_option
|
| 704 |
|
| 705 |
# Create and launch the Gradio interface
|
| 706 |
print("🚀 Launching CICE 2.0 Healthcare Assessment Tool...")
|
|
|
|
| 2 |
|
| 3 |
# Configure ZeroGPU
|
| 4 |
@spaces.GPU
|
| 5 |
+
def process_video_with_gpu(video, resize_option):
|
| 6 |
"""ZeroGPU-accelerated video processing"""
|
| 7 |
+
# Create assessor inside the GPU function to avoid pickling issues
|
| 8 |
+
from google import genai
|
| 9 |
+
client = genai.Client(api_key=GOOGLE_API_KEY)
|
| 10 |
+
assessor = CICE_Assessment(client)
|
| 11 |
return process_video_core(video, resize_option, assessor)
|
| 12 |
|
| 13 |
import gradio as gr
|
|
|
|
| 704 |
# Wrapper function that calls the GPU-accelerated version
|
| 705 |
def process_video(video, resize_option):
|
| 706 |
"""Wrapper function to call GPU-accelerated processing"""
|
| 707 |
+
return process_video_with_gpu(video, resize_option)
|
| 708 |
|
| 709 |
# Create and launch the Gradio interface
|
| 710 |
print("🚀 Launching CICE 2.0 Healthcare Assessment Tool...")
|