aznasut commited on
Commit
9096fd8
·
1 Parent(s): 6993853

ignore temp files

Browse files
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -5,13 +5,13 @@ import aiohttp
5
  from fastapi import FastAPI, File, UploadFile, HTTPException
6
  from fastapi.responses import JSONResponse
7
 
8
- # import os
9
- # from os import path
10
  # cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
11
-
12
- # os.environ["TRANSFORMERS_CACHE"] = cache_path
13
- # os.environ["HF_HUB_CACHE"] = cache_path
14
- # os.environ["HF_HOME"] = cache_path
15
 
16
  # PATH = 'huggingface'
17
  # DATASETPATH = '/home/ahmadzen/.cache/huggingface/datasets'
 
5
  from fastapi import FastAPI, File, UploadFile, HTTPException
6
  from fastapi.responses import JSONResponse
7
 
8
+ import os
9
+ from os import path
10
  # cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
11
+ cache_path = "~/hf_home"
12
+ os.environ["TRANSFORMERS_CACHE"] = cache_path
13
+ os.environ["HF_HUB_CACHE"] = cache_path
14
+ os.environ["HF_HOME"] = cache_path
15
 
16
  # PATH = 'huggingface'
17
  # DATASETPATH = '/home/ahmadzen/.cache/huggingface/datasets'