Spaces:
Runtime error
Runtime error
Commit ·
db6196b
1
Parent(s): ad7e5e4
Fix: Import spaces before gradio/torch to prevent CUDA initialization error
Browse filesThe ZeroGPU spaces package must be imported before any CUDA-related
packages. Moving spaces import to the top fixes RuntimeError on startup.
app.py
CHANGED
|
@@ -3,8 +3,9 @@ Surya OCR Studio - Complete Implementation
|
|
| 3 |
Features: OCR, Text Detection, Layout Analysis, Table Recognition, LaTeX OCR
|
| 4 |
"""
|
| 5 |
|
| 6 |
-
|
| 7 |
import spaces
|
|
|
|
| 8 |
import logging
|
| 9 |
import os
|
| 10 |
import json
|
|
|
|
| 3 |
Features: OCR, Text Detection, Layout Analysis, Table Recognition, LaTeX OCR
|
| 4 |
"""
|
| 5 |
|
| 6 |
+
# Import spaces FIRST before any CUDA-related packages
|
| 7 |
import spaces
|
| 8 |
+
import gradio as gr
|
| 9 |
import logging
|
| 10 |
import os
|
| 11 |
import json
|