Update joycaption.py
Browse files- joycaption.py +7 -7
joycaption.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
import os
|
| 2 |
#if os.environ.get("SPACES_ZERO_GPU") is not None:
|
| 3 |
# import spaces
|
| 4 |
-
else:
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
import gradio as gr
|
| 12 |
from huggingface_hub import InferenceClient, HfApi
|
| 13 |
from torch import nn
|
|
|
|
| 1 |
import os
|
| 2 |
#if os.environ.get("SPACES_ZERO_GPU") is not None:
|
| 3 |
# import spaces
|
| 4 |
+
#else:
|
| 5 |
+
class spaces:
|
| 6 |
+
@staticmethod
|
| 7 |
+
def GPU(func):
|
| 8 |
+
def wrapper(*args, **kwargs):
|
| 9 |
+
return func(*args, **kwargs)
|
| 10 |
+
return wrapper
|
| 11 |
import gradio as gr
|
| 12 |
from huggingface_hub import InferenceClient, HfApi
|
| 13 |
from torch import nn
|