Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,17 +11,11 @@ import torch
|
|
| 11 |
# Get absolute path to workspace root
|
| 12 |
WORKSPACE_ROOT = os.path.dirname(os.path.abspath(__file__))
|
| 13 |
|
| 14 |
-
# Check CUDA availability
|
| 15 |
-
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 16 |
-
# We want to get True
|
| 17 |
-
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
| 18 |
-
# GPU Name
|
| 19 |
|
| 20 |
# Initialize model globally for reuse
|
| 21 |
print("Loading Moondream model...")
|
| 22 |
model, tokenizer = load_moondream()
|
| 23 |
|
| 24 |
-
|
| 25 |
# Uncomment for Hugging Face Spaces
|
| 26 |
@spaces.GPU(duration=120)
|
| 27 |
def process_video_file(
|
|
|
|
| 11 |
# Get absolute path to workspace root
|
| 12 |
WORKSPACE_ROOT = os.path.dirname(os.path.abspath(__file__))
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Initialize model globally for reuse
|
| 16 |
print("Loading Moondream model...")
|
| 17 |
model, tokenizer = load_moondream()
|
| 18 |
|
|
|
|
| 19 |
# Uncomment for Hugging Face Spaces
|
| 20 |
@spaces.GPU(duration=120)
|
| 21 |
def process_video_file(
|