Staticaliza commited on
Commit
8a86647
1 Parent(s): 7c732b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -29,7 +29,7 @@ footer {
29
  # Functions
30
  @spaces.GPU(duration=60)
31
  def generate(image, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7, top_p=0.8, top_k=100, repetition_penalty=1.05, max_tokens=512):
32
- global model, tokenizer
33
 
34
  print(image)
35
  # image_rgb = Image.open(image).convert("RGB")
@@ -46,8 +46,8 @@ def generate(image, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7,
46
  "max_new_tokens": max_tokens
47
  }
48
 
49
- output = model.chat(image=None, msgs=inputs, tokenizer=tokenizer, **parameters)
50
-
51
  return output
52
 
53
  def cloud():
 
29
  # Functions
30
  @spaces.GPU(duration=60)
31
  def generate(image, instruction=DEFAULT_INPUT, sampling=False, temperature=0.7, top_p=0.8, top_k=100, repetition_penalty=1.05, max_tokens=512):
32
+ global repo, tokenizer
33
 
34
  print(image)
35
  # image_rgb = Image.open(image).convert("RGB")
 
46
  "max_new_tokens": max_tokens
47
  }
48
 
49
+ output = repo.chat(image=None, msgs=inputs, tokenizer=tokenizer, **parameters)
50
+ print(output)
51
  return output
52
 
53
  def cloud():