matanmichaely commited on
Commit
d7ef93f
·
1 Parent(s): cc3baaa

Update app.py

Browse files

add dotenv logic

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,10 +1,13 @@
 
1
  from transformers import pipeline
2
  import streamlit as st
3
  import os
4
 
5
 
 
 
6
 
7
- # img2text
8
  def img_to_text(url):
9
  image_to_text = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
10
 
 
1
+ from dotenv import find_dotenv, load_dotenv
2
  from transformers import pipeline
3
  import streamlit as st
4
  import os
5
 
6
 
7
+ # load env variables from .env file
8
+ load_dotenv(find_dotenv())
9
 
10
+ # img to text
11
  def img_to_text(url):
12
  image_to_text = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
13