Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,6 @@ import spaces
|
|
6 |
import sys
|
7 |
import torch
|
8 |
from shap_e.models.transmitter.base import Transmitter, VectorDecoder
|
9 |
-
from shap_e.util.collections import AttrDict
|
10 |
|
11 |
import torch
|
12 |
import torch.nn as nn
|
@@ -539,7 +538,7 @@ def create_demo():
|
|
539 |
)
|
540 |
|
541 |
# Set up event handlers
|
542 |
-
@spaces.GPU(duration=
|
543 |
def generate(prompt, guidance_scale, num_steps):
|
544 |
try:
|
545 |
torch.cuda.empty_cache() # Clear GPU memory before starting
|
|
|
6 |
import sys
|
7 |
import torch
|
8 |
from shap_e.models.transmitter.base import Transmitter, VectorDecoder
|
|
|
9 |
|
10 |
import torch
|
11 |
import torch.nn as nn
|
|
|
538 |
)
|
539 |
|
540 |
# Set up event handlers
|
541 |
+
@spaces.GPU(duration=80) # Add GPU decorator to the generate function
|
542 |
def generate(prompt, guidance_scale, num_steps):
|
543 |
try:
|
544 |
torch.cuda.empty_cache() # Clear GPU memory before starting
|