~firefoxphpai-chat
12 items • Download ./*

..
ajax.php
ana-ai-chat.png
atom-one-dark.min.css
emoji.json
favicon.ico
highlight.min.js
index.php
note.txt
readme.txt
setup.php
setup_and_launch.py
worker.php


ai-chatsetup_and_launch.py
1 KB• 10•  6 days ago•  DownloadRawClose
6 days ago•  10

{}
import os
import subprocess
import sys

def run_cmd(cmd):
    print(f"\n[EXEC] {cmd}")
    subprocess.run(cmd, shell=True, check=True)

def main():
    print("=== AI Node Setup & Launcher for GTX 1070 (Windows) ===")

    # 1. Setup Python Virtual Environment for utilities/bridges if needed
    if not os.path.exists("venv"):
        run_cmd("python -m venv venv")

    # Activate venv syntax check or direct pip execution via venv path
    pip_path = os.path.join("venv", "Scripts", "pip")
    python_path = os.path.join("venv", "Scripts", "python")

    run_cmd(f"{pip_path} install --upgrade pip requests")

    print("\n--- Model Backend Instructions ---")
    print("1. OLLAMA (Text Models):")
    print("   Make sure Ollama is installed on Windows (from ollama.com).")
    print("   To allow your Linux server to access it, set environment variable OLLAMA_HOST=0.0.0.0:11434")
    print("   Pull a lightweight 8GB-friendly model via CMD: ollama run qwen2.5:7b-instruct-q4_K_M")

    print("\n2. STABLE DIFFUSION (AUTOMATIC1111 / Forge):")
    print("   Launch your WebUI batch file with flags for your GTX 1070:")
    print("   webui-user.bat --medvram --api --listen")
    print("   (--listen opens it to your LAN; --api enables the endpoint for PHP)")

if __name__ == "__main__":
    main()

Top
©twily.info 2013 - 2026
twily at twily dot info



3 816 608 visits
... ^ v