Spaces:
Runtime error
Runtime error
Know for a fact this works locally
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def run_aim():
|
|
25 |
subprocess.run(["unzip", "test.zip"])
|
26 |
subprocess.run(["mv", "test/.aim/", "/home/user/app/.aim/"])
|
27 |
time.sleep(3)
|
28 |
-
cmd = f"aim up --host 0.0.0.0 --port
|
29 |
subprocess.run(cmd, shell=True)
|
30 |
|
31 |
"""
|
@@ -45,7 +45,7 @@ def run_aim():
|
|
45 |
|
46 |
html = f"""
|
47 |
<iframe
|
48 |
-
src="http://
|
49 |
>
|
50 |
</iframe>
|
51 |
"""
|
@@ -55,6 +55,14 @@ def run():
|
|
55 |
|
56 |
def main():
|
57 |
run_aim()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
|
60 |
if __name__ == "__main__":
|
|
|
25 |
subprocess.run(["unzip", "test.zip"])
|
26 |
subprocess.run(["mv", "test/.aim/", "/home/user/app/.aim/"])
|
27 |
time.sleep(3)
|
28 |
+
cmd = f"aim up --host 0.0.0.0 --port 7861 --dev &"
|
29 |
subprocess.run(cmd, shell=True)
|
30 |
|
31 |
"""
|
|
|
45 |
|
46 |
html = f"""
|
47 |
<iframe
|
48 |
+
src="http://127.0.0.1:7861/"
|
49 |
>
|
50 |
</iframe>
|
51 |
"""
|
|
|
55 |
|
56 |
def main():
|
57 |
run_aim()
|
58 |
+
time.sleep(5)
|
59 |
+
demo = gr.Interface(
|
60 |
+
fn=run,
|
61 |
+
inputs=[],
|
62 |
+
outputs=gr.HTML(html),
|
63 |
+
)
|
64 |
+
|
65 |
+
demo.launch()
|
66 |
|
67 |
|
68 |
if __name__ == "__main__":
|