mkzeros commited on
Commit
7199a54
·
1 Parent(s): ca21e7b
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- # Proper image captioning model
5
  pipe = pipeline(
6
- "image-to-text",
7
- model="Salesforce/blip-image-captioning-base"
8
  )
9
 
10
  def describe_image(image):
@@ -19,9 +19,10 @@ demo = gr.Interface(
19
  fn=describe_image,
20
  inputs=gr.Image(type="pil"),
21
  outputs="text",
22
- title="🖼️ Image Caption AI (Lightweight)",
23
- description="Upload an image and get a description."
24
  )
25
 
26
  if __name__ == "__main__":
27
- demo.launch()
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ # Lightweight image captioning model
5
  pipe = pipeline(
6
+ "image-text-to-text",
7
+ model="microsoft/git-base"
8
  )
9
 
10
  def describe_image(image):
 
19
  fn=describe_image,
20
  inputs=gr.Image(type="pil"),
21
  outputs="text",
22
+ title="🖼️ Image Description AI (Lightweight)",
23
+ description="Upload an image and the AI will describe it."
24
  )
25
 
26
  if __name__ == "__main__":
27
+ demo.launch()
28
+