Spaces:
Running
Running
Lucasstranger1
commited on
Commit
•
d9c2f6c
1
Parent(s):
34e03b9
update
Browse files
app.py
CHANGED
@@ -6,14 +6,12 @@ from transformers import pipeline
|
|
6 |
from PIL import Image
|
7 |
from dotenv import load_dotenv
|
8 |
|
9 |
-
# Load environment variables from .env file
|
10 |
-
load_dotenv()
|
11 |
-
|
12 |
-
# Set up the Hugging Face API URL and your API key
|
13 |
API_URL = "https://api-inference.huggingface.co/models/trpakov/vit-face-expression"
|
14 |
headers = {"Authorization": f"Bearer {os.getenv('HUGGINGFACE_API_KEY')}"}
|
15 |
|
16 |
-
#
|
|
|
|
|
17 |
def query(filename):
|
18 |
with open(filename, "rb") as f:
|
19 |
data = f.read()
|
|
|
6 |
from PIL import Image
|
7 |
from dotenv import load_dotenv
|
8 |
|
|
|
|
|
|
|
|
|
9 |
API_URL = "https://api-inference.huggingface.co/models/trpakov/vit-face-expression"
|
10 |
headers = {"Authorization": f"Bearer {os.getenv('HUGGINGFACE_API_KEY')}"}
|
11 |
|
12 |
+
# Your existing functions and Streamlit code...
|
13 |
+
|
14 |
+
# Example query function
|
15 |
def query(filename):
|
16 |
with open(filename, "rb") as f:
|
17 |
data = f.read()
|