Spaces:
Sleeping
Sleeping
Update src/models/imageCaptioning.py
Browse files
src/models/imageCaptioning.py
CHANGED
|
@@ -2,10 +2,9 @@
|
|
| 2 |
import requests
|
| 3 |
import base64
|
| 4 |
import os
|
| 5 |
-
from dotenv import load_dotenv
|
| 6 |
|
| 7 |
-
|
| 8 |
-
hf_token = os.
|
| 9 |
|
| 10 |
API_URL = "https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-base" # Or any other captioning model
|
| 11 |
headers = {
|
|
|
|
| 2 |
import requests
|
| 3 |
import base64
|
| 4 |
import os
|
|
|
|
| 5 |
|
| 6 |
+
|
| 7 |
+
hf_token = os.environ.get("HUGGINGFACE_API_TOKEN")
|
| 8 |
|
| 9 |
API_URL = "https://api-inference.huggingface.co/models/Salesforce/blip-image-captioning-base" # Or any other captioning model
|
| 10 |
headers = {
|