sandz7 commited on
Commit
69eca47
Β·
1 Parent(s): d364219

added spaces decoration

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -65,10 +65,12 @@ import requests
65
  import torch
66
  import subprocess
67
  import gradio as gr
 
68
 
69
  model_id = "xtuner/llava-llama-3-8b-v1_1-transformers"
70
  pipe = pipeline("image-to-text", model=model_id, torch_dtype=torch.float16, device=0)
71
 
 
72
  def krypton(input_image):
73
 
74
  pil_image = Image.fromarray(input_image.astype('uint8'), 'RGB')
 
65
  import torch
66
  import subprocess
67
  import gradio as gr
68
+ import spaces
69
 
70
  model_id = "xtuner/llava-llama-3-8b-v1_1-transformers"
71
  pipe = pipeline("image-to-text", model=model_id, torch_dtype=torch.float16, device=0)
72
 
73
+ @spaces.GPU(duration=120)
74
  def krypton(input_image):
75
 
76
  pil_image = Image.fromarray(input_image.astype('uint8'), 'RGB')