File size: 689 Bytes
12f095b 7fb3dec 12f095b 28bd27e 12f095b 28bd27e 12f095b |
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 35 36 37 38 39 |
# Launch AIM
import subprocess
import os
from huggingface_hub import hf_hub_download
import gradio as gr
import time
PORT = 7860
HOST = "0.0.0.0"
REPO_ID = "muellerzr/bert-base-cased-tpu-accelerate-experiments"
def download_logs():
filename = "aim_logs.zip"
f = hf_hub_download(
repo_id=REPO_ID,
repo_type="model",
filename=filename,
cache_dir = "."
)
subprocess.run(f"unzip {f}".split())
def run_aim():
cmd = f"aim up --host {HOST} --port {PORT}".split()
subprocess.Popen(cmd)
def run():
print("Starting server....")
def main():
download_logs()
run_aim()
time.sleep(5)
if __name__ == "__main__":
main()
|