File size: 676 Bytes
e12b49b
 
 
 
 
26cd3ca
987f93c
5368e3d
e12b49b
99d0af0
b4766e8
e12b49b
 
 
046bbdd
77944a8
 
0fad831
9b0a28f
922b25a
 
e94509b
046bbdd
2146985
 
 
1c27b73
786238d
5368e3d
1c27b73
 
 
e12b49b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Launch AIM

import subprocess
import os
from huggingface_hub import hf_hub_download
import time
from pathlib import Path
import gradio as gr

PORT = 7860
HOST = "0.0.0.0"

REPO_ID = "muellerzr/bert-base-cased-tpu-accelerate-experiments"

def run_aim():
    subprocess.run(["unzip", "test.zip"])
    subprocess.run(["mv", "test/.aim/", "/home/user/app/.aim/"])
    time.sleep(3)
    cmd = f"aim up --host 0.0.0.0 --port 7860 --dev --base-path /api".split(" ")
    env = os.environ.copy()
    env["__AIM_PROXY_URL__"] = "0.0.0.0:7860"
    subprocess.run(cmd, env=env)

def run():
  print("Running app!")

def main():
    run_aim()
    

if __name__ == "__main__":
    main()