cosmo3769 commited on
Commit
f79530d
1 Parent(s): f721d1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,12 +1,12 @@
1
  import gradio as gr
2
- from transformers import PaliGemmaProcessor, PaliGemmaForConditionalGeneration
3
  from PIL import Image
4
  import torch
5
 
6
  # Load model and processor
7
  model_id = "cosmo3769/finetuned_paligemma_vqav2_small"
8
  model = PaliGemmaForConditionalGeneration.from_pretrained(model_id)
9
- processor = PaliGemmaProcessor.from_pretrained("google/paligemma-3b-pt-224")
10
 
11
  # Define inference function
12
  def process_image(image, prompt):
 
1
  import gradio as gr
2
+ from transformers import AutoProcessor, PaliGemmaForConditionalGeneration
3
  from PIL import Image
4
  import torch
5
 
6
  # Load model and processor
7
  model_id = "cosmo3769/finetuned_paligemma_vqav2_small"
8
  model = PaliGemmaForConditionalGeneration.from_pretrained(model_id)
9
+ processor = AutoProcessor.from_pretrained("google/paligemma-3b-pt-224")
10
 
11
  # Define inference function
12
  def process_image(image, prompt):