Spaces:
Running
on
Zero
Running
on
Zero
rizavelioglu
commited on
Commit
·
c02cab9
1
Parent(s):
2d0a646
fix zerogpu
Browse files- app.py +3 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -6,6 +6,8 @@ from torchvision.io import read_image
|
|
| 6 |
from typing import Dict
|
| 7 |
import os
|
| 8 |
from huggingface_hub import login
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Get token from environment variable
|
| 11 |
hf_token = os.getenv("access_token")
|
|
@@ -93,7 +95,7 @@ class VAETester:
|
|
| 93 |
# Initialize tester
|
| 94 |
tester = VAETester()
|
| 95 |
|
| 96 |
-
@spaces.GPU(duration=
|
| 97 |
def test_all_vaes(image_path: str, tolerance: float):
|
| 98 |
"""Gradio interface function to test all VAEs"""
|
| 99 |
try:
|
|
|
|
| 6 |
from typing import Dict
|
| 7 |
import os
|
| 8 |
from huggingface_hub import login
|
| 9 |
+
import spaces
|
| 10 |
+
|
| 11 |
|
| 12 |
# Get token from environment variable
|
| 13 |
hf_token = os.getenv("access_token")
|
|
|
|
| 95 |
# Initialize tester
|
| 96 |
tester = VAETester()
|
| 97 |
|
| 98 |
+
@spaces.GPU(duration=5)
|
| 99 |
def test_all_vaes(image_path: str, tolerance: float):
|
| 100 |
"""Gradio interface function to test all VAEs"""
|
| 101 |
try:
|
requirements.txt
CHANGED
|
@@ -3,4 +3,5 @@ torchvision
|
|
| 3 |
accelerate
|
| 4 |
diffusers
|
| 5 |
safetensors
|
| 6 |
-
huggingface_hub
|
|
|
|
|
|
| 3 |
accelerate
|
| 4 |
diffusers
|
| 5 |
safetensors
|
| 6 |
+
huggingface_hub
|
| 7 |
+
spaces
|