Update app.py
Browse filescomment out "spaces"
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import spaces
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import InferenceClient
|
4 |
from torch import nn
|
@@ -156,7 +156,7 @@ image_adapter.eval()
|
|
156 |
image_adapter.to("cuda")
|
157 |
|
158 |
|
159 |
-
|
160 |
@torch.no_grad()
|
161 |
def stream_chat(input_image: Image.Image, caption_type: str, caption_length: str | int, extra_options: list[str], name_input: str, custom_prompt: str) -> tuple[str, str]:
|
162 |
torch.cuda.empty_cache()
|
|
|
1 |
+
#import spaces
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import InferenceClient
|
4 |
from torch import nn
|
|
|
156 |
image_adapter.to("cuda")
|
157 |
|
158 |
|
159 |
+
#@spaces.GPU()
|
160 |
@torch.no_grad()
|
161 |
def stream_chat(input_image: Image.Image, caption_type: str, caption_length: str | int, extra_options: list[str], name_input: str, custom_prompt: str) -> tuple[str, str]:
|
162 |
torch.cuda.empty_cache()
|