Spaces:
Sleeping
Sleeping
File size: 1,144 Bytes
1ec044c 8fc9334 b1ed202 8fc9334 0116367 f1bf5c1 9b3cfc2 8fc9334 3c2a93b b1ed202 8fc9334 b1ed202 8fc9334 3c2a93b 1623472 8fc9334 5b59963 cea9e80 2e37069 cea9e80 c33c8af |
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 |
import subprocess
import os
import time
# Install required packages
subprocess.call(["pip", "install", "flet==0.19.0"])
subprocess.call(["pip", "install", "flet_fastapi==0.19.0"])
# Get GitHub token from environment variable
gh_token = os.getenv("gh_token")
# Construct GitHub URL with token for cloning
url_with_token = f"https://{gh_token}@github.com/Eslam-Magdy-1297/ESearch_FletV01.git"
# Clone the repository
os.system(f"git clone {url_with_token}")
# Wait for cloning to complete
time.sleep(10)
import subprocess
import os
import time
# Install required packages
subprocess.call(["pip", "install", "flet==0.19.0"])
subprocess.call(["pip", "install", "flet_fastapi==0.19.0"])
# Get GitHub token from environment variable
gh_token = os.getenv("gh_token")
# Construct GitHub URL with token for cloning
url_with_token = f"https://{gh_token}@github.com/Eslam-Magdy-1297/ESearch_FletV01.git"
# Clone the repository
os.system(f"git clone {url_with_token}")
# Wait for cloning to complete
time.sleep(10)
# Read and execute main.py code directly
with open("ESearch_FletV01/app.py", "r") as file:
code = file.read()
exec(code)
|