Spaces:
Running on Zero
Running on Zero
Import spaces at the very top of app.py to prevent CUDA initialization error on Hugging Face Spaces
Browse files
app.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
"""Production Document Question Answering (DQA) - Gradio Web Interface.
|
| 2 |
|
| 3 |
Configured for native Hugging Face Spaces deployment.
|
|
|
|
| 1 |
+
# IMPORTANT: spaces must be imported at the very top for Hugging Face Spaces / ZeroGPU
|
| 2 |
+
try:
|
| 3 |
+
import spaces
|
| 4 |
+
except Exception:
|
| 5 |
+
pass
|
| 6 |
+
|
| 7 |
"""Production Document Question Answering (DQA) - Gradio Web Interface.
|
| 8 |
|
| 9 |
Configured for native Hugging Face Spaces deployment.
|