bep40 commited on
Commit
d7f41b2
·
verified ·
1 Parent(s): 7dbefc9

Restore Space runtime to revision b9b6ba4

Browse files
Files changed (1) hide show
  1. restore_runner.py +2 -6
restore_runner.py CHANGED
@@ -1,13 +1,10 @@
1
  import os
2
  import sys
3
- import subprocess
4
  from huggingface_hub import snapshot_download
5
 
6
- REVISION = os.environ.get("VNEWS_RESTORE_REVISION", "bcaa2dc")
7
  REPO_ID = os.environ.get("VNEWS_REPO_ID", "bep40/vnews")
8
 
9
- # Download exact Space snapshot from Hugging Face Hub.
10
- # This avoids manually copying huge files from an old commit.
11
  snapshot_dir = snapshot_download(
12
  repo_id=REPO_ID,
13
  repo_type="space",
@@ -19,10 +16,9 @@ snapshot_dir = snapshot_download(
19
  os.chdir(snapshot_dir)
20
  sys.path.insert(0, snapshot_dir)
21
 
22
- # Commit bcaa2dc Dockerfile ran ai_patch:app.
23
  cmd = [
24
  "uvicorn",
25
- "ai_patch:app",
26
  "--host",
27
  "0.0.0.0",
28
  "--port",
 
1
  import os
2
  import sys
 
3
  from huggingface_hub import snapshot_download
4
 
5
+ REVISION = os.environ.get("VNEWS_RESTORE_REVISION", "b9b6ba4")
6
  REPO_ID = os.environ.get("VNEWS_REPO_ID", "bep40/vnews")
7
 
 
 
8
  snapshot_dir = snapshot_download(
9
  repo_id=REPO_ID,
10
  repo_type="space",
 
16
  os.chdir(snapshot_dir)
17
  sys.path.insert(0, snapshot_dir)
18
 
 
19
  cmd = [
20
  "uvicorn",
21
+ "ai_runtime_final6:app",
22
  "--host",
23
  "0.0.0.0",
24
  "--port",