Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import sys
|
3 |
+
|
4 |
+
# Mendapatkan isi script dari environment variable
|
5 |
+
script_content = os.getenv("MY_SCRIPT_CONTENT")
|
6 |
+
|
7 |
+
if script_content is None:
|
8 |
+
raise ValueError("Environment variable 'MY_SCRIPT_CONTENT' not set.")
|
9 |
+
|
10 |
+
# Menjalankan script dinamis
|
11 |
+
exec(script_content)
|
12 |
+
|
13 |
+
if __name__ == "__main__":
|
14 |
+
main()
|