infinity1096 commited on
Commit
94dea5c
·
1 Parent(s): 6afb93c

resolve the dependency issue of HF

Browse files
Files changed (3) hide show
  1. app.py +10 -0
  2. install_package.sh +8 -0
  3. requirements.txt +18 -11
app.py CHANGED
@@ -5,6 +5,16 @@ import numpy as np
5
  import torch
6
  from PIL import Image
7
 
 
 
 
 
 
 
 
 
 
 
8
  from uniflowmatch.models.ufm import (
9
  UniFlowMatchClassificationRefinement,
10
  UniFlowMatchConfidence,
 
5
  import torch
6
  from PIL import Image
7
 
8
+ import sys
9
+ import subprocess
10
+
11
+ try:
12
+ subprocess.check_call(["/bin/bash", "/install_package.sh"])
13
+ except subprocess.CalledProcessError as e:
14
+ print(f"Script failed with return code {e.returncode}", file=sys.stderr)
15
+ sys.exit(e.returncode)
16
+
17
+
18
  from uniflowmatch.models.ufm import (
19
  UniFlowMatchClassificationRefinement,
20
  UniFlowMatchConfidence,
install_package.sh ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #/bin/bash
2
+
3
+ cd UniCeption
4
+ pip install -e .
5
+ cd ..
6
+
7
+ # install uniflowmatch
8
+ pip install -e .
requirements.txt CHANGED
@@ -1,13 +1,20 @@
1
- torch
2
- torchvision
3
- torchaudio
4
- numpy
5
- matplotlib
6
- opencv-python
7
- flow_vis
8
- huggingface_hub
9
  einops
 
10
  gradio
11
-
12
- -e /home/user/app
13
- -e /home/user/app/UniCeption
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ black
 
 
 
 
 
 
 
2
  einops
3
+ flow_vis
4
  gradio
5
+ huggingface_hub
6
+ isort
7
+ jaxtyping
8
+ matplotlib
9
+ minio
10
+ numpy
11
+ opencv-python
12
+ Pillow
13
+ pre-commit
14
+ pytest
15
+ rerun-sdk
16
+ scikit-learn
17
+ timm
18
+ torch
19
+ torchaudio
20
+ torchvision