Spaces:
Running
Running
Added locations for saving model
Browse files- app.py +4 -0
- test_huggingface.py +1 -1
app.py
CHANGED
@@ -7,6 +7,10 @@ from smoldocling import cli
|
|
7 |
import shutil
|
8 |
import dotenv
|
9 |
|
|
|
|
|
|
|
|
|
10 |
# Load environment variables
|
11 |
dotenv.load_dotenv()
|
12 |
|
|
|
7 |
import shutil
|
8 |
import dotenv
|
9 |
|
10 |
+
os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface/transformers"
|
11 |
+
os.environ["HF_HUB_CACHE"] = "/tmp/huggingface/hub"
|
12 |
+
|
13 |
+
|
14 |
# Load environment variables
|
15 |
dotenv.load_dotenv()
|
16 |
|
test_huggingface.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import requests
|
2 |
|
3 |
file_path = "C:/Users/Job Ian/Desktop/iSURE/rare-diseases/data/legislatures/AZ_h_1913_apr_special_p9.png"
|
4 |
-
url = "https://
|
5 |
|
6 |
with open(file_path, "rb") as f:
|
7 |
response = requests.post(url, files={"file": f})
|
|
|
1 |
import requests
|
2 |
|
3 |
file_path = "C:/Users/Job Ian/Desktop/iSURE/rare-diseases/data/legislatures/AZ_h_1913_apr_special_p9.png"
|
4 |
+
url = "https://jobian-smoldocling-api.hf.space/parse"
|
5 |
|
6 |
with open(file_path, "rb") as f:
|
7 |
response = requests.post(url, files={"file": f})
|