ndc8
commited on
Commit
·
83df634
1
Parent(s):
4599528
update
Browse files- backend_service.py +4 -0
backend_service.py
CHANGED
@@ -3,6 +3,10 @@ FastAPI Backend AI Service converted from Gradio app
|
|
3 |
Provides OpenAI-compatible chat completion endpoints
|
4 |
"""
|
5 |
|
|
|
|
|
|
|
|
|
6 |
import asyncio
|
7 |
import logging
|
8 |
import time
|
|
|
3 |
Provides OpenAI-compatible chat completion endpoints
|
4 |
"""
|
5 |
|
6 |
+
# Direct Hugging Face caches to a writable folder under /tmp
|
7 |
+
import os
|
8 |
+
os.environ.setdefault("HF_HOME", "/tmp/.cache/huggingface")
|
9 |
+
os.environ.setdefault("TRANSFORMERS_CACHE", "/tmp/.cache/huggingface")
|
10 |
import asyncio
|
11 |
import logging
|
12 |
import time
|