Nahiyan14 commited on
Commit
cbd5a41
·
verified ·
1 Parent(s): 90948b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,10 +1,9 @@
1
  import os
2
 
3
- # Create a writable cache directory
4
- os.environ['TRANSFORMERS_CACHE'] = '/app/model_cache'
5
- os.environ['HF_HOME'] = '/app/model_cache'
6
- os.makedirs('/app/model_cache', exist_ok=True)
7
-
8
 
9
  from flask import Flask, render_template, jsonify, request
10
  from src.helper import download_hugging_face_embeddings
 
1
  import os
2
 
3
+ # Try using a different directory path where you should have permissions
4
+ os.environ['TRANSFORMERS_CACHE'] = '/tmp/model_cache'
5
+ os.environ['HF_HOME'] = '/tmp/model_cache'
6
+ os.makedirs('/tmp/model_cache', exist_ok=True)
 
7
 
8
  from flask import Flask, render_template, jsonify, request
9
  from src.helper import download_hugging_face_embeddings