Spaces:
Runtime error
Runtime error
File size: 972 Bytes
e12b49b 26cd3ca 987f93c e12b49b 163c31c 1c27b73 e12b49b 046bbdd e457096 1c27b73 e457096 77944a8 fbc4da1 636ce67 c4c4e6d 046bbdd 60e1af6 71f7183 60e1af6 1ffa778 1c27b73 71f7183 60e1af6 1c27b73 786238d 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# Launch AIM
import subprocess
import os
from huggingface_hub import hf_hub_download
import time
from pathlib import Path
PORT = 7860
HOST = "0.0.0.0"
REPO_ID = "muellerzr/bert-base-cased-tpu-accelerate-experiments"
def run_aim():
"""
filename = "aim_logs.zip"
f = hf_hub_download(
repo_id=REPO_ID,
repo_type="model",
filename=filename,
cache_dir = "."
)
"""
subprocess.run(["unzip", "test.zip"])
subprocess.run(["mv", "test/.aim/", "/home/user/app/.aim/"])
time.sleep(5)
cmd = f"aim up --host {HOST} --port {PORT} --dev".split()
subprocess.run(cmd)
html = f"""
<iframe
src="http://{HOST}:{PORT}"
style=""
position: fixed;
top: 0px;
bottom: 0px;
right: 0px;
width: 100%;
border: none;
margin: 0;
padding: 0;
overflow: hidden;
z-index: 999999;
height: 100%;
</iframe>
"""
def main():
run_aim()
if __name__ == "__main__":
main()
|