Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ Environment variables (set as HF Space Secrets):
|
|
| 13 |
|
| 14 |
import os
|
| 15 |
import time
|
|
|
|
| 16 |
from dotenv import load_dotenv
|
| 17 |
|
| 18 |
load_dotenv()
|
|
@@ -42,7 +43,7 @@ llm = OpenAI(base_url=VLLM_BASE_URL, api_key=os.getenv("OPENAI_API_KEY", "not-re
|
|
| 42 |
# Avatar image paths (relative to this file)
|
| 43 |
AVATAR_DIR = os.path.join(os.path.dirname(__file__), "avatar")
|
| 44 |
AVATAR_IMAGES = {
|
| 45 |
-
tag: os.path.join(AVATAR_DIR, f"avatar_{tag}.png")
|
| 46 |
for tag in ("smile", "nod", "concerned", "gentle", "laugh")
|
| 47 |
}
|
| 48 |
|
|
|
|
| 13 |
|
| 14 |
import os
|
| 15 |
import time
|
| 16 |
+
from PIL import Image
|
| 17 |
from dotenv import load_dotenv
|
| 18 |
|
| 19 |
load_dotenv()
|
|
|
|
| 43 |
# Avatar image paths (relative to this file)
|
| 44 |
AVATAR_DIR = os.path.join(os.path.dirname(__file__), "avatar")
|
| 45 |
AVATAR_IMAGES = {
|
| 46 |
+
tag: Image.open(os.path.join(AVATAR_DIR, f"avatar_{tag}.png"))
|
| 47 |
for tag in ("smile", "nod", "concerned", "gentle", "laugh")
|
| 48 |
}
|
| 49 |
|