Makhinur commited on
Commit
7794eb7
·
verified ·
1 Parent(s): 4798680

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -53,7 +53,9 @@ def run(message: str,
53
  output += response.token.text
54
 
55
  def generate_image_caption(image_data):
56
- interface = gr.Interface.load("models/Salesforce/blip-image-captioning-base", HF_TOKEN=HF_TOKEN)
 
 
57
  caption = interface(image_data)
58
  return caption
59
 
 
53
  output += response.token.text
54
 
55
  def generate_image_caption(image_data):
56
+ # Ensure the HF_TOKEN environment variable is set
57
+ os.environ["HF_TOKEN"] = HF_TOKEN
58
+ interface = gr.Interface.load("models/Salesforce/blip-image-captioning-base")
59
  caption = interface(image_data)
60
  return caption
61