Commit
·
d7ef93f
1
Parent(s):
cc3baaa
Update app.py
Browse filesadd dotenv logic
app.py
CHANGED
@@ -1,10 +1,13 @@
|
|
|
|
1 |
from transformers import pipeline
|
2 |
import streamlit as st
|
3 |
import os
|
4 |
|
5 |
|
|
|
|
|
6 |
|
7 |
-
#
|
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 |
|