Iblouse commited on
Commit
f3b340f
1 Parent(s): 973104b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -2,13 +2,15 @@ import os
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
- # Initialize the pipeline with the image-to-text model
6
- model_path = "Salesforce/blip-image-captioning-base"
7
- if not os.path.exists(model_path):
8
- raise FileNotFoundError(f"Model path {model_path} does not exist. Please provide a valid path.")
 
9
 
10
  # Initialize the image-to-text pipeline with the specified model
11
- pipe = pipeline("image-to-text", model=model_path)
 
12
 
13
  def launch(input):
14
  """
 
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
+ # # Initialize the pipeline with the image-to-text model
6
+ # model_path = "Salesforce/blip-image-captioning-base"
7
+
8
+ # if not os.path.exists(model_path):
9
+ # raise FileNotFoundError(f"Model path {model_path} does not exist. Please provide a valid path.")
10
 
11
  # Initialize the image-to-text pipeline with the specified model
12
+ pipe = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
13
+ #pipe = pipeline("image-to-text", model=model_path)
14
 
15
  def launch(input):
16
  """