garychew commited on
Commit
ff9a698
·
verified ·
1 Parent(s): c0c295c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -1,4 +1,12 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
2
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
 
1
  import gradio as gr
2
+ import requests
3
+ from PIL import Image
4
+ from transformers import AutoProcessor, BlipForConditionalGeneration
5
+
6
+ # Load the pretrained processor and model
7
+ processor = AutoProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
8
+ model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base")
9
+
10
 
11
  def greet(name):
12
  return "Hello " + name + "!!"