Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -22,6 +22,11 @@ if not is_spaces:
|
|
| 22 |
|
| 23 |
MODEL_PATH = os.getenv("MODEL_PATH", "Jiaqi-hkust/Robust-R1-RL")
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
print(f"==========================================")
|
| 27 |
print(f"Initializing application...")
|
|
|
|
| 22 |
|
| 23 |
MODEL_PATH = os.getenv("MODEL_PATH", "Jiaqi-hkust/Robust-R1-RL")
|
| 24 |
|
| 25 |
+
def gpu_decorator(func):
|
| 26 |
+
"""条件应用 GPU 装饰器"""
|
| 27 |
+
if spaces_available and GPU is not None:
|
| 28 |
+
return GPU(func)
|
| 29 |
+
return func
|
| 30 |
|
| 31 |
print(f"==========================================")
|
| 32 |
print(f"Initializing application...")
|