Spaces:
Sleeping
Sleeping
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) | |