Spaces:
Sleeping
Sleeping
SimonLanger
commited on
Commit
•
5979bfe
1
Parent(s):
c1896a7
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import subprocess
|
3 |
+
from pathlib import Path
|
4 |
+
|
5 |
+
#if not Path('fullappcode.py').exists():
|
6 |
+
print('downloading')
|
7 |
+
subprocess.run(["wget", "-q", "-O", "fullappcode.py", os.environ['trueappurl']],
|
8 |
+
stdout = subprocess.DEVNULL,
|
9 |
+
stderr = subprocess.DEVNULL)
|
10 |
+
print('downloaded')
|
11 |
+
|
12 |
+
print('running')
|
13 |
+
exec(Path("fullappcode.py").read_text('utf8'))
|
14 |
+
print('returned from running')
|
15 |
+
|