Spaces:
Sleeping
Sleeping
Rename app.pyy to app.py
Browse files- app.pyy → app.py +8 -0
app.pyy → app.py
RENAMED
@@ -2,6 +2,7 @@
|
|
2 |
# It includes all the code from the previous successful steps.
|
3 |
|
4 |
# Combined Imports
|
|
|
5 |
import os
|
6 |
import gradio as gr
|
7 |
from huggingface_hub import InferenceClient
|
@@ -23,6 +24,13 @@ from dateutil.relativedelta import relativedelta # Corrected typo
|
|
23 |
import traceback # Import traceback
|
24 |
import base64 # Import base64
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# Suppress warnings
|
28 |
warnings.filterwarnings("ignore", category=UserWarning)
|
|
|
2 |
# It includes all the code from the previous successful steps.
|
3 |
|
4 |
# Combined Imports
|
5 |
+
import spaces
|
6 |
import os
|
7 |
import gradio as gr
|
8 |
from huggingface_hub import InferenceClient
|
|
|
24 |
import traceback # Import traceback
|
25 |
import base64 # Import base64
|
26 |
|
27 |
+
@spaces.GPU
|
28 |
+
def startup():
|
29 |
+
print("GPU function registered for Hugging Face Spaces startup.")
|
30 |
+
return "Ready"
|
31 |
+
|
32 |
+
startup()
|
33 |
+
|
34 |
|
35 |
# Suppress warnings
|
36 |
warnings.filterwarnings("ignore", category=UserWarning)
|