Spaces:
Paused
Paused
Update app.py
Browse files
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
|
|
@@ -139,7 +139,7 @@ image_adapter.eval()
|
|
| 139 |
image_adapter.to("cuda")
|
| 140 |
|
| 141 |
|
| 142 |
-
@spaces.GPU()
|
| 143 |
@torch.no_grad()
|
| 144 |
def stream_chat(input_image: Image.Image, caption_type: str, caption_tone: str, caption_length: str | int) -> str:
|
| 145 |
torch.cuda.empty_cache()
|
|
|
|
| 1 |
+
# import spaces
|
| 2 |
import gradio as gr
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
from torch import nn
|
|
|
|
| 139 |
image_adapter.to("cuda")
|
| 140 |
|
| 141 |
|
| 142 |
+
# @spaces.GPU()
|
| 143 |
@torch.no_grad()
|
| 144 |
def stream_chat(input_image: Image.Image, caption_type: str, caption_tone: str, caption_length: str | int) -> str:
|
| 145 |
torch.cuda.empty_cache()
|