cmpatino HF Staff commited on
Commit
737355d
·
verified ·
1 Parent(s): a42a6a0

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app/hub.py +4 -1
app/hub.py CHANGED
@@ -7,7 +7,10 @@ from dataclasses import dataclass
7
  from pathlib import Path
8
  from typing import Iterable
9
 
10
- import httpx
 
 
 
11
  from huggingface_hub import (
12
  batch_bucket_files,
13
  bucket_info,
 
7
  from pathlib import Path
8
  from typing import Iterable
9
 
10
+ try: # huggingface_hub 2.x ships its own httpx fork; 1.x uses httpx itself.
11
+ import httpx2 as httpx # type: ignore[import-not-found]
12
+ except ImportError:
13
+ import httpx # httpx is not in requirements.txt: it comes with huggingface_hub
14
  from huggingface_hub import (
15
  batch_bucket_files,
16
  bucket_info,