lkjjj26 commited on
Commit
1a3570b
ยท
1 Parent(s): 6ea2eee

add transformer path variable

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -15,6 +15,12 @@ warnings.filterwarnings('ignore')
15
  # Load environment variables from .env file
16
  load_dotenv()
17
 
 
 
 
 
 
 
18
  class PDBSearchAssistant:
19
  def __init__(self, model_name="google/flan-t5-large"):
20
  # Set up HuggingFace pipeline with better model
 
15
  # Load environment variables from .env file
16
  load_dotenv()
17
 
18
+ cache_dir = "./transformers_cache"
19
+ os.makedirs(cache_dir, exist_ok=True) # ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ
20
+ os.environ["TRANSFORMERS_CACHE"] = cache_dir # Hugging Face ์บ์‹œ ๊ฒฝ๋กœ ์„ค์ •
21
+
22
+ print("Hugging Face Cache Path:", os.getenv("TRANSFORMERS_CACHE"))
23
+
24
  class PDBSearchAssistant:
25
  def __init__(self, model_name="google/flan-t5-large"):
26
  # Set up HuggingFace pipeline with better model