TobyYang7 commited on
Commit
38c55e2
1 Parent(s): edb62bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,7 @@ import torch
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,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