Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from typing import Optional
|
|
6 |
import transformers
|
7 |
from dataclasses import dataclass, field
|
8 |
import io
|
|
|
9 |
import base64
|
10 |
from PIL import Image
|
11 |
import gradio as gr
|
@@ -193,7 +194,7 @@ class LLMService:
|
|
193 |
|
194 |
service = LLMService(args)
|
195 |
|
196 |
-
|
197 |
def generate(text_list, image_list, max_new_tokens, force_boi, force_bbox):
|
198 |
with torch.no_grad():
|
199 |
text_list = text_list.split(IMG_FLAG)
|
|
|
6 |
import transformers
|
7 |
from dataclasses import dataclass, field
|
8 |
import io
|
9 |
+
import spaces
|
10 |
import base64
|
11 |
from PIL import Image
|
12 |
import gradio as gr
|
|
|
194 |
|
195 |
service = LLMService(args)
|
196 |
|
197 |
+
@spaces.GPU
|
198 |
def generate(text_list, image_list, max_new_tokens, force_boi, force_bbox):
|
199 |
with torch.no_grad():
|
200 |
text_list = text_list.split(IMG_FLAG)
|