Skip to content

Add multi-backend free AI code generator with web UI and chat mode#1

Draft
gabehak wants to merge 1 commit into
mainfrom
claude/free-ai-tool-creation-6xdvly
Draft

Add multi-backend free AI code generator with web UI and chat mode#1
gabehak wants to merge 1 commit into
mainfrom
claude/free-ai-tool-creation-6xdvly

Conversation

@gabehak

@gabehak gabehak commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • HuggingFace Inference API as the default backend — works instantly, no model download, free tier requires no signup
  • Ollama backend for fully offline/local inference (run ollama serve + ollama pull codellama)
  • Local model backend retained for direct GPU inference via transformers
  • Interactive chat mode (codex-cli chat) with conversation history, language switching, and iterative refinement
  • Gradio web UI (python app.py) with dropdowns for model, backend, and language
  • Rich terminal output with syntax highlighting, line numbers, and spinners
  • requirements.txt slimmed to just requests, click, rich, python-dotenv — torch/transformers now optional extras

Test plan

  • pip install -r requirements.txt installs without errors
  • python codex_cli.py generate -p "fibonacci in python" returns code via HF API
  • python codex_cli.py chat enters interactive mode, exit quits cleanly
  • python codex_cli.py models lists all model keys
  • python codex_cli.py generate -p "hello world" -o out.py writes file
  • python app.py launches Gradio UI at localhost:7860
  • HF_TOKEN=xxx python codex_cli.py generate -p "test" uses token

https://claude.ai/code/session_01Pj4aHSU99U1BYpkq31KNEF


Generated by Claude Code

- HuggingFace Inference API as default backend (no download, free tier)
- Ollama backend for fully local, offline inference
- Local model backend retained for GPU-accelerated inference
- Interactive chat mode with conversation history and language switching
- Gradio web UI (app.py) with model/backend/language selectors
- Rich terminal output with syntax highlighting and spinners
- requirements.txt trimmed to only mandatory deps (torch/transformers optional)
- setup.py extras_require for [local] and [web] installs
- .env.example for HF_TOKEN configuration

https://claude.ai/code/session_01Pj4aHSU99U1BYpkq31KNEF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants