lfolle commited on
Commit
4a8e930
1 Parent(s): 6d19733

Adapted git clone to use private git5 repo.

Browse files
Files changed (5) hide show
  1. README.md +1 -1
  2. app.py +5 -1
  3. entrypoint.py +8 -0
  4. repos/__empty__ +0 -0
  5. requirements.txt +0 -1
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.1.4
8
- app_file: app.py
9
  pinned: false
10
  ---
11
 
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.1.4
8
+ app_file: entrypoint.py
9
  pinned: false
10
  ---
11
 
app.py CHANGED
@@ -1,9 +1,13 @@
 
 
1
  import gradio as gr
2
  from PIL import Image
3
 
4
  from backend import Infer
5
 
6
- DEBUG = True
 
 
7
 
8
  infer = Infer(DEBUG)
9
  example_image_path = ["assets/example_1.jpg", "assets/example_2.jpg", "assets/example_3.jpg"]
1
+ import os
2
+ import pip
3
  import gradio as gr
4
  from PIL import Image
5
 
6
  from backend import Infer
7
 
8
+
9
+ DEBUG = False
10
+
11
 
12
  infer = Infer(DEBUG)
13
  example_image_path = ["assets/example_1.jpg", "assets/example_2.jpg", "assets/example_3.jpg"]
entrypoint.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from huggingface_hub import Repository
5
+
6
+ Repository("repos/hand-ki-model", f"https://oauth2:{os.getenv('HANDKIGIT5')}@git5.cs.fau.de/folle/hand-ki-model.git", use_auth_token=os.getenv(""))
7
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "repos/hand-ki-model/"])
8
+ import app
repos/__empty__ ADDED
File without changes
requirements.txt CHANGED
@@ -1,6 +1,5 @@
1
  opencv-python
2
  numpy
3
- git+https://git5.cs.fau.de/folle/hand-ki-model.git
4
  gradio
5
  huggingface_hub
6
  --extra-index-url https://download.pytorch.org/whl/cu116
1
  opencv-python
2
  numpy
 
3
  gradio
4
  huggingface_hub
5
  --extra-index-url https://download.pytorch.org/whl/cu116