Spaces:
Sleeping
Sleeping
File size: 1,230 Bytes
fbebf66 3c02ff0 fbebf66 3c02ff0 fbebf66 3c02ff0 cb9d075 fbebf66 3c02ff0 fbebf66 3c02ff0 fbebf66 3c02ff0 fbebf66 3c02ff0 b19dc43 67e38fa cb9d075 |
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
import gradio as gr
from src.model.him_model import HIMModel
from src.core.config import HIMConfig
def initialize_model():
config = HIMConfig()
return HIMModel(config)
def process_input(text: str, context: str = "", consciousness_level: float = 0.8):
input_data = {
"text": text,
"context": context,
"consciousness_parameters": {
"level": consciousness_level
}
}
result = model.process(input_data)
return {
"response": result["response"],
"consciousness_state": result["consciousness_metrics"],
"emotional_state": result["emotional_state"]
}
model = initialize_model()
interface = gr.Interface(
fn=process_input,
inputs=[
gr.Textbox(label="Input Text"),
gr.Textbox(label="Context (optional)"),
gr.Slider(minimum=0.0, maximum=1.0, value=0.8, label="Consciousness Level")
],
outputs=[
gr.Textbox(label="HIM Response"),
gr.JSON(label="Consciousness State"),
gr.JSON(label="Emotional State")
],
title="Hybrid Intelligence Matrix (HIM)",
description="Interact with HIM - A Hybrid Intelligence System"
)
if __name__ == "__main__":
interface.launch()
|