jonathanjordan21 commited on
Commit
6897581
·
verified ·
1 Parent(s): a16b787

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ pipe = pipeline("image-to-text", model=model_id)
7
  def generate_text(prompt, image):
8
  # Generate text description
9
  prompt = f"USER: <image>\n{prompt}\nASSISTANT:"
10
- text_description = pipe(images=image, prompt=prompt,generate_kwargs={"max_new_tokens": 200})) # Batch for efficiency
11
  return text_description[0]
12
 
13
  # Create Gradio interface
 
7
  def generate_text(prompt, image):
8
  # Generate text description
9
  prompt = f"USER: <image>\n{prompt}\nASSISTANT:"
10
+ text_description = pipe(images=image, prompt=prompt,generate_kwargs={"max_new_tokens": 200}) # Batch for efficiency
11
  return text_description[0]
12
 
13
  # Create Gradio interface