Arts-of-coding's picture
Update app.py
fcbd917
raw
history blame
452 Bytes
import os
from dotenv import load_dotenv
from subprocess import Popen
load_dotenv()
command = ["pip", "uninstall", "ipykernel"]
worker = Popen(command)
worker.wait()
command = ["pip", "install", "ipykernel"]
worker = Popen(command)
worker.wait()
command = ["pip", "install", "numexpr==2.7.3"]
worker = Popen(command)
worker.wait()
command = ["mercury", "run", f"0.0.0.0:{os.environ.get('PORT', 7860)}"]
worker = Popen(command)
worker.wait()