MiniDPVO / app.py
pablovela5620's picture
add pixi check and install
b607519
raw
history blame
660 Bytes
import gradio as gr
import subprocess
from pathlib import Path
PIXI_PATH = Path("/home/user/.pixi/bin/pixi")
def check_and_install_pixi():
try:
subprocess.check_call("pixi --version", shell=True)
except subprocess.CalledProcessError:
print("pixi not found. Installing pixi...")
# Install pixi using the provided installation script
subprocess.check_call("curl -fsSL https://pixi.sh/install.sh | bash", shell=True)
if __name__ == "__main__":
check_and_install_pixi()
def greet(name):
return "Hello " + name + "!!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()