Spaces:
Sleeping
Sleeping
Eslam Magdy
commited on
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,35 +1 @@
|
|
| 1 |
-
|
| 2 |
-
import time
|
| 3 |
-
import shutil
|
| 4 |
-
import subprocess
|
| 5 |
-
|
| 6 |
-
command = ["pip", "install", "flet"]
|
| 7 |
-
|
| 8 |
-
subprocess.run(command, check=True)
|
| 9 |
-
|
| 10 |
-
command = ["pip", "install", "flet-fastapi==0.19.0", "--no-deps"]
|
| 11 |
-
|
| 12 |
-
subprocess.run(command, check=True)
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
gh_token = os.getenv("gh_token")
|
| 16 |
-
|
| 17 |
-
url_with_token = f"https://{gh_token}@github.com/Eslam-Magdy-1297/Adel_Flet_Demo.git"
|
| 18 |
-
|
| 19 |
-
os.system(f"git clone {url_with_token}")
|
| 20 |
-
|
| 21 |
-
time.sleep(10)
|
| 22 |
-
|
| 23 |
-
source_dir = "Adel_Flet_Demo"
|
| 24 |
-
destination_dir = "."
|
| 25 |
-
|
| 26 |
-
for item in os.listdir(source_dir):
|
| 27 |
-
s = os.path.join(source_dir, item)
|
| 28 |
-
d = os.path.join(destination_dir, item)
|
| 29 |
-
shutil.move(s, d)
|
| 30 |
-
|
| 31 |
-
os.rmdir(source_dir)
|
| 32 |
-
|
| 33 |
-
with open("App.py", "r") as file:
|
| 34 |
-
code = file.read()
|
| 35 |
-
exec(code)
|
|
|
|
| 1 |
+
print("hi")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|