init
Browse files
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import shlex
|
3 |
+
import gradio as gr
|
4 |
+
import subprocess
|
5 |
+
from huggingface_hub import HfApi
|
6 |
+
|
7 |
+
hf_token = os.getenv("LSM_token")
|
8 |
+
|
9 |
+
api = HfApi()
|
10 |
+
api.snapshot_download(repo_id="kairunwen/LSM_private", repo_type="space", local_dir=".", token=hf_token)
|
11 |
+
subprocess.run(shlex.split("pip install -r requirements.txt"))
|
12 |
+
subprocess.run(shlex.split("python app.py"))
|