vickeee465 commited on
Commit
9358f09
·
1 Parent(s): 6c5318d
Files changed (2) hide show
  1. app.py +7 -0
  2. utils.py +0 -1
app.py CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
  from spacy import glossary
 
1
+ import os
2
+ PATH = '/data/'
3
+ os.environ['TRANSFORMERS_CACHE'] = PATH
4
+ os.environ['HF_HOME'] = PATH
5
+ os.environ['HF_DATASETS_CACHE'] = PATH
6
+ os.environ['TORCH_HOME'] = PATH
7
+
8
  import gradio as gr
9
 
10
  from spacy import glossary
utils.py CHANGED
@@ -13,7 +13,6 @@ from interfaces.sentiment import build_huggingface_path as hf_sentiment_path
13
  from interfaces.emotion import build_huggingface_path as hf_emotion_path
14
 
15
 
16
- os.environ['TRANSFORMERS_CACHE'] = '/data/'
17
  HF_TOKEN = os.environ["hf_read"]
18
 
19
  models = [hf_manifesto_path(""), hf_sentiment_path(""), hf_emotion_path("")]
 
13
  from interfaces.emotion import build_huggingface_path as hf_emotion_path
14
 
15
 
 
16
  HF_TOKEN = os.environ["hf_read"]
17
 
18
  models = [hf_manifesto_path(""), hf_sentiment_path(""), hf_emotion_path("")]