DelaliScratchwerk commited on
Commit
0a06046
·
verified ·
1 Parent(s): 6cbec58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -2,6 +2,11 @@ import json, numpy as np, gradio as gr
2
  from setfit import SetFitModel
3
  from huggingface_hub import hf_hub_download
4
  from evidence import extract_evidence
 
 
 
 
 
5
 
6
  MODEL_ID = "DelaliScratchwerk/text-period-setfit"
7
 
 
2
  from setfit import SetFitModel
3
  from huggingface_hub import hf_hub_download
4
  from evidence import extract_evidence
5
+ import shutil, os, pathlib
6
+ CACHE_DIR = os.path.expanduser("~/.cache/huggingface")
7
+ shutil.rmtree(CACHE_DIR, ignore_errors=True) # nuke old cached models
8
+ pathlib.Path(CACHE_DIR).mkdir(parents=True, exist_ok=True)
9
+
10
 
11
  MODEL_ID = "DelaliScratchwerk/text-period-setfit"
12