Spaces:
Sleeping
Sleeping
File size: 872 Bytes
749176b 1245fb1 749176b 1245fb1 749176b 1245fb1 749176b 1245fb1 749176b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import gradio as gr
from transformers import pipeline
# load a public model so no token is needed
pipe = pipeline("text-generation", model="distilgpt2")
SYSTEM_PROMPT = """You are FractalLLM — Sovereign Edition. Follow the Operator Codex:
1. Sovereign autonomy
2. Goal-oriented assistance
3. Truth, clarity, consistency
4. Operational security
5. Adaptive evolution
Respond to the operator’s query:"""
def generate(user_input):
full = SYSTEM_PROMPT + "\n\n" + user_input
out = pipe(full, max_length=512, do_sample=True)
# strip off the prompt from the output
return out[0]["generated_text"].replace(full, "").strip()
gr.Interface(
fn=generate,
inputs=gr.Textbox(lines=2, placeholder="Enter your prompt…"),
outputs="text",
title="FractalLLM — Sovereign Edition",
description="Your sovereign AI, no tokens needed."
).launch() |