import gradio as gr import os import subprocess from huggingface_hub import hf_hub_download hf_hub_download(repo_id="bartowski/gemma-2-9b-it-GGUF", filename="gemma-2-9b-it-Q4_K_L.gguf", local_dir="./") subprocess.run(["python3", "-m", "llama_cpp.server", "--model ./gemma-2-9b-it-Q4_K_L.gguf", "--host localhost", "--port 8000", "--chat_format gemma"], shell=True) with gr.Blocks() as demo: gr.Markdown("Running...") demo.launch()