Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
from PIL import Image
|
7 |
from transformers import AutoProcessor, LlavaForConditionalGeneration, TextIteratorStreamer, TextStreamer
|
8 |
|
9 |
-
|
10 |
import argparse
|
11 |
|
12 |
from llava_llama3.model.builder import load_pretrained_model
|
@@ -48,6 +48,7 @@ tokenizer, llava_model, image_processor, context_len = load_pretrained_model(
|
|
48 |
args.load_4bit,
|
49 |
device=args.device)
|
50 |
|
|
|
51 |
def bot_streaming(message, history):
|
52 |
print(message)
|
53 |
image_file = None
|
|
|
6 |
from PIL import Image
|
7 |
from transformers import AutoProcessor, LlavaForConditionalGeneration, TextIteratorStreamer, TextStreamer
|
8 |
|
9 |
+
import spaces
|
10 |
import argparse
|
11 |
|
12 |
from llava_llama3.model.builder import load_pretrained_model
|
|
|
48 |
args.load_4bit,
|
49 |
device=args.device)
|
50 |
|
51 |
+
@spaces.GPU
|
52 |
def bot_streaming(message, history):
|
53 |
print(message)
|
54 |
image_file = None
|