raylim commited on
Commit
3cf942c
·
unverified ·
1 Parent(s): 8079e33

build: install paladin when deploying on hf spaces

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -8,9 +8,16 @@ from mosaic.gradio_app import download_and_process_models
8
  from mosaic.ui import launch_gradio
9
 
10
  if __name__ == "__main__":
 
 
 
 
 
 
 
11
  # Download models and initialize cancer subtype mappings
12
  download_and_process_models()
13
-
14
  # Launch the Gradio interface
15
  # Use default settings suitable for Hugging Face Spaces
16
  launch_gradio(
 
8
  from mosaic.ui import launch_gradio
9
 
10
  if __name__ == "__main__":
11
+ # Install Paladin from GitHub
12
+ GIT_TOKEN = os.environ.get("GH_TOKEN")
13
+ subprocess.run(
14
+ f"pip install git+https://{GIT_TOKEN}@github.com/pathology-data-mining/paladin.git@dev",
15
+ shell=True,
16
+ )
17
+
18
  # Download models and initialize cancer subtype mappings
19
  download_and_process_models()
20
+
21
  # Launch the Gradio interface
22
  # Use default settings suitable for Hugging Face Spaces
23
  launch_gradio(