https://github.com/cgpeanut/llm_workflow

A Coding Implementation to Build a Complete Self-Hosted LLM Workflow with Ollama, REST API, and Gradio Chat Interface

https://github.com/cgpeanut/llm_workflow

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

A Coding Implementation to Build a Complete Self-Hosted LLM Workflow with Ollama, REST API, and Gradio Chat Interface

Basic Info
  • Host: GitHub
  • Owner: cgpeanut
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 2.31 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 10 months ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

LLM_Workflow

A Coding Implementation to Build a Complete Self-Hosted LLM Workflow with Ollama, REST API, and Gradio Chat Interface

In this tutorial, we implement a fully functional Ollama environment inside Google Colab to replicate a self-hosted LLM workflow. We begin by installing Ollama directly on the Colab VM using the official Linux installer and then launch the Ollama server in the background to expose the HTTP API on localhost:11434. After verifying the service, we pull lightweight models such as qwen2.5:0.5b-instruct or llama3.2:1b, which balance resource constraints with usability in a CPU-only environment. To interact with these models programmatically, we use the /api/chat endpoint via Python’s requests module with streaming enabled, which allows token-level output to be captured incrementally. Finally, we layer a Gradio-based UI on top of this client so we can issue prompts, maintain multi-turn history, configure parameters like temperature and context size, and view results in real time. Check out the Full Codes here.

We first check if Ollama is already installed on the system, and if not, we install it using the official script. At the same time, we ensure Gradio is available by importing it or installing the required version when missing. This way, we prepare our Colab environment for running the chat interface smoothly. Check out the Full Codes here.

We start the Ollama server in the background and keep checking its health endpoint until it responds successfully. By doing this, we ensure the server is running and ready before sending any API requests. Check out the Full Codes here.

We start the Ollama server in the background and keep checking its health endpoint until it responds successfully. By doing this, we ensure the server is running and ready before sending any API requests. Check out the Full Codes here.

Owner

  • Login: cgpeanut
  • Kind: user
  • Location: Spring Hill, TN

GitHub Events

Total
  • Push event: 3
  • Create event: 1
Last Year
  • Push event: 3
  • Create event: 1

Dependencies

setup.py pypi
source_code/A2A_Simple_Agent/pyproject.toml pypi
  • a2a-sdk >=0.2.7
  • python-a2a >=0.5.9
  • uvicorn >=0.34.3
source_code/A2A_Simple_Agent/uv.lock pypi
  • a2a-sdk 0.2.7
  • aiohappyeyeballs 2.6.1
  • aiohttp 3.12.12
  • aiosignal 1.3.2
  • annotated-types 0.7.0
  • anthropic 0.54.0
  • anyio 4.9.0
  • attrs 25.3.0
  • blinker 1.9.0
  • boto3 1.38.35
  • botocore 1.38.35
  • cachetools 5.5.2
  • certifi 2025.4.26
  • cffi 1.17.1
  • charset-normalizer 3.4.2
  • click 8.2.1
  • colorama 0.4.6
  • distro 1.9.0
  • fastapi 0.115.12
  • flask 3.1.1
  • frozenlist 1.7.0
  • google-api-core 2.25.0
  • google-auth 2.40.3
  • googleapis-common-protos 1.70.0
  • greenlet 3.2.3
  • grpcio 1.73.0
  • grpcio-reflection 1.73.0
  • grpcio-tools 1.73.0
  • h11 0.16.0
  • httpcore 1.0.9
  • httpx 0.28.1
  • httpx-sse 0.4.0
  • idna 3.10
  • importlib-metadata 8.7.0
  • itsdangerous 2.2.0
  • jinja2 3.1.6
  • jiter 0.10.0
  • jmespath 1.0.1
  • jsonpatch 1.33
  • jsonpointer 3.0.0
  • langchain 0.3.25
  • langchain-core 0.3.65
  • langchain-text-splitters 0.3.8
  • langsmith 0.3.45
  • markupsafe 3.0.2
  • multidict 6.4.4
  • openai 1.86.0
  • opentelemetry-api 1.34.1
  • opentelemetry-sdk 1.34.1
  • opentelemetry-semantic-conventions 0.55b1
  • orjson 3.10.18
  • packaging 24.2
  • propcache 0.3.2
  • proto-plus 1.26.1
  • protobuf 6.31.1
  • pyasn1 0.6.1
  • pyasn1-modules 0.4.2
  • pycparser 2.22
  • pydantic 2.11.5
  • pydantic-core 2.33.2
  • python-a2a 0.5.9
  • python-dateutil 2.9.0.post0
  • pyyaml 6.0.2
  • requests 2.32.4
  • requests-toolbelt 1.0.0
  • rsa 4.9.1
  • s3transfer 0.13.0
  • setuptools 80.9.0
  • simple-agent 0.1.0
  • six 1.17.0
  • sniffio 1.3.1
  • sqlalchemy 2.0.41
  • sse-starlette 2.3.6
  • starlette 0.46.2
  • tenacity 9.1.2
  • tqdm 4.67.1
  • typing-extensions 4.14.0
  • typing-inspection 0.4.1
  • urllib3 2.4.0
  • uvicorn 0.34.3
  • werkzeug 3.1.3
  • yarl 1.20.1
  • zipp 3.23.0
  • zstandard 0.23.0