Upload 7 files
Browse files- .gitattributes +1 -0
- README.md +11 -12
- compare.html +28 -0
- index.html +23 -19
- logo.png +3 -0
- script-compare.js +48 -0
- script.js +46 -0
- style.css +119 -28
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
logo.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
+
# AERIS Chatbox
|
2 |
+
|
3 |
+
This is a minimalist frontend interface to interact with **AERIS**, a cognitive reasoning layer designed to enhance LLM inference via dialectical structures.
|
4 |
+
|
5 |
+
- ✅ Frontend only (HTML/CSS/JS)
|
6 |
+
- ✅ Calls a public OpenAI-compatible API hosted on Render
|
7 |
+
- ✅ No tracking, no storage, no backend logic here
|
8 |
+
|
9 |
+
> “Experience dialectical reasoning with AERIS”
|
10 |
+
|
11 |
+
To test it live, visit: https://AERIS-project.github.io/aeris-chatbox/
|
|
compare.html
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
+
<title>Compare AERIS vs Baseline</title>
|
7 |
+
<link rel="stylesheet" href="style.css" />
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<div class="container">
|
11 |
+
<h1>Compare AERIS vs Baseline</h1>
|
12 |
+
<input type="text" id="compare-input" placeholder="Enter a message to compare..." />
|
13 |
+
<button onclick="runComparison()">Compare</button>
|
14 |
+
<div class="comparison-columns">
|
15 |
+
<div>
|
16 |
+
<h2>Gemma-27B (No AERIS)</h2>
|
17 |
+
<div class="chat-window" id="baseline-window"></div>
|
18 |
+
</div>
|
19 |
+
<div>
|
20 |
+
<h2>AERIS (Gemma-27B)</h2>
|
21 |
+
<div class="chat-window" id="aeris-window"></div>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<a href="index.html" class="compare-button">← Back to AERIS</a>
|
25 |
+
</div>
|
26 |
+
<script src="script-compare.js"></script>
|
27 |
+
</body>
|
28 |
+
</html>
|
index.html
CHANGED
@@ -1,19 +1,23 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
+
<title>AERIS Chatbox</title>
|
7 |
+
<link rel="stylesheet" href="style.css" />
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<div class="container">
|
11 |
+
<h1><span class="tagline">Experience <strong>dialectical reasoning</strong> with A<span class="aeris-logo">E</span>RIS</span></h1>
|
12 |
+
<img src="logo.png" alt="AERIS Logo" class="logo" />
|
13 |
+
<div class="chat-window" id="chat-window"></div>
|
14 |
+
<div class="input-area">
|
15 |
+
<input type="text" id="user-input" placeholder="Enter a message..." />
|
16 |
+
<button onclick="sendMessage()">Send</button>
|
17 |
+
<button onclick="clearChat()">Clear</button>
|
18 |
+
</div>
|
19 |
+
<a href="compare.html" class="compare-button">Compare with baseline →</a>
|
20 |
+
</div>
|
21 |
+
<script src="script.js"></script>
|
22 |
+
</body>
|
23 |
+
</html>
|
logo.png
ADDED
![]() |
Git LFS Details
|
script-compare.js
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const aerisEndpoint = "https://aeris-framework.onrender.com/v1/chat/completions";
|
2 |
+
const baselineEndpoint = "https://aeris-framework.onrender.com/v1/chat/baseline";
|
3 |
+
|
4 |
+
const headers = {
|
5 |
+
"Content-Type": "application/json"
|
6 |
+
};
|
7 |
+
|
8 |
+
async function runComparison() {
|
9 |
+
const input = document.getElementById("compare-input").value.trim();
|
10 |
+
if (!input) return;
|
11 |
+
|
12 |
+
// Clean outputs
|
13 |
+
document.getElementById("baseline-window").innerHTML = "<em>Loading…</em>";
|
14 |
+
document.getElementById("aeris-window").innerHTML = "<em>Thinking…</em>";
|
15 |
+
|
16 |
+
// Baseline request (sans AERIS)
|
17 |
+
const baseline = await fetch(baselineEndpoint, {
|
18 |
+
method: "POST",
|
19 |
+
headers,
|
20 |
+
body: JSON.stringify({
|
21 |
+
model: "google/gemma-3-27b-it",
|
22 |
+
temperature: 1.0,
|
23 |
+
max_tokens: 800,
|
24 |
+
messages: [{ role: "user", content: input }]
|
25 |
+
})
|
26 |
+
}).then(r => r.json());
|
27 |
+
|
28 |
+
const raw = baseline.choices?.[0]?.message?.content || "No response.";
|
29 |
+
document.getElementById("baseline-window").innerHTML = raw;
|
30 |
+
|
31 |
+
// AERIS request
|
32 |
+
const enriched = await fetch(aerisEndpoint, {
|
33 |
+
method: "POST",
|
34 |
+
headers,
|
35 |
+
body: JSON.stringify({
|
36 |
+
model: "gpt-4", // ou "google/gemma-3-27b-it" si AERIS tourne dessus
|
37 |
+
temperature: 1.0,
|
38 |
+
max_tokens: 800,
|
39 |
+
messages: [
|
40 |
+
{ role: "system", content: "You are AERIS, a dialectical reasoning assistant." },
|
41 |
+
{ role: "user", content: input }
|
42 |
+
]
|
43 |
+
})
|
44 |
+
}).then(r => r.json());
|
45 |
+
|
46 |
+
const response = enriched.choices?.[0]?.message?.content || "No response.";
|
47 |
+
document.getElementById("aeris-window").innerHTML = response;
|
48 |
+
}
|
script.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const endpoint = "https://aeris-framework.onrender.com/v1/chat/completions";
|
2 |
+
|
3 |
+
const chatWindow = document.getElementById("chat-window");
|
4 |
+
const userInput = document.getElementById("user-input");
|
5 |
+
|
6 |
+
function appendMessage(role, text) {
|
7 |
+
const message = document.createElement("div");
|
8 |
+
message.className = "message " + (role === "You" ? "user" : "aeris");
|
9 |
+
message.innerHTML = `<strong>${role}:</strong> ${text}`;
|
10 |
+
chatWindow.appendChild(message);
|
11 |
+
chatWindow.scrollTop = chatWindow.scrollHeight;
|
12 |
+
}
|
13 |
+
|
14 |
+
async function sendMessage() {
|
15 |
+
const input = userInput.value.trim();
|
16 |
+
if (!input) return;
|
17 |
+
|
18 |
+
appendMessage("You", input);
|
19 |
+
userInput.value = "";
|
20 |
+
|
21 |
+
appendMessage("AERIS", "<em>thinking…</em>");
|
22 |
+
|
23 |
+
const response = await fetch(endpoint, {
|
24 |
+
method: "POST",
|
25 |
+
headers: {
|
26 |
+
"Content-Type": "application/json"
|
27 |
+
},
|
28 |
+
body: JSON.stringify({
|
29 |
+
model: "gpt-4",
|
30 |
+
messages: [
|
31 |
+
{ role: "system", content: "You are AERIS, a dialectical reasoning assistant." },
|
32 |
+
{ role: "user", content: input }
|
33 |
+
]
|
34 |
+
})
|
35 |
+
});
|
36 |
+
|
37 |
+
const data = await response.json();
|
38 |
+
const message = data.choices?.[0]?.message?.content || "Error: no response.";
|
39 |
+
|
40 |
+
chatWindow.lastChild.remove(); // remove thinking…
|
41 |
+
appendMessage("AERIS", message);
|
42 |
+
}
|
43 |
+
|
44 |
+
function clearChat() {
|
45 |
+
chatWindow.innerHTML = "";
|
46 |
+
}
|
style.css
CHANGED
@@ -1,28 +1,119 @@
|
|
1 |
-
body {
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
background-color: #080808;
|
3 |
+
color: #ffffff;
|
4 |
+
font-family: 'Segoe UI', sans-serif;
|
5 |
+
margin: 0;
|
6 |
+
padding: 0;
|
7 |
+
height: 100vh;
|
8 |
+
display: flex;
|
9 |
+
justify-content: center;
|
10 |
+
align-items: center;
|
11 |
+
}
|
12 |
+
|
13 |
+
.container {
|
14 |
+
text-align: center;
|
15 |
+
max-width: 800px;
|
16 |
+
width: 100%;
|
17 |
+
padding: 20px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.logo {
|
21 |
+
width: 200px;
|
22 |
+
max-height: 200px;
|
23 |
+
margin: 30px auto;
|
24 |
+
display: block;
|
25 |
+
}
|
26 |
+
|
27 |
+
h1 {
|
28 |
+
font-size: 1.5rem;
|
29 |
+
font-weight: normal;
|
30 |
+
margin-bottom: 10px;
|
31 |
+
color: #d0d8f0;
|
32 |
+
}
|
33 |
+
|
34 |
+
h1 strong {
|
35 |
+
color: #ffffff;
|
36 |
+
}
|
37 |
+
|
38 |
+
.chat-window {
|
39 |
+
background-color: #121212;
|
40 |
+
border: 1px solid #222;
|
41 |
+
border-radius: 10px;
|
42 |
+
padding: 15px;
|
43 |
+
height: 350px;
|
44 |
+
overflow-y: auto;
|
45 |
+
margin: 20px 0;
|
46 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.5);
|
47 |
+
text-align: left;
|
48 |
+
}
|
49 |
+
|
50 |
+
.message {
|
51 |
+
margin-bottom: 12px;
|
52 |
+
padding: 10px 14px;
|
53 |
+
border-radius: 8px;
|
54 |
+
max-width: 80%;
|
55 |
+
word-wrap: break-word;
|
56 |
+
}
|
57 |
+
|
58 |
+
.user {
|
59 |
+
background-color: #1e1e1e;
|
60 |
+
align-self: flex-end;
|
61 |
+
margin-left: auto;
|
62 |
+
border: 1px solid #444;
|
63 |
+
}
|
64 |
+
|
65 |
+
.aeris {
|
66 |
+
background-color: #182033;
|
67 |
+
color: #d8e6ff;
|
68 |
+
border-left: 3px solid #8fb5dd;
|
69 |
+
border-radius: 8px;
|
70 |
+
}
|
71 |
+
|
72 |
+
.input-area {
|
73 |
+
display: flex;
|
74 |
+
gap: 10px;
|
75 |
+
}
|
76 |
+
|
77 |
+
input[type="text"] {
|
78 |
+
flex: 1;
|
79 |
+
padding: 10px;
|
80 |
+
border: 1px solid #444;
|
81 |
+
border-radius: 4px;
|
82 |
+
background-color: #1a1a1a;
|
83 |
+
color: #fff;
|
84 |
+
}
|
85 |
+
|
86 |
+
button {
|
87 |
+
padding: 10px 16px;
|
88 |
+
background-color: #2d2d2d;
|
89 |
+
border: none;
|
90 |
+
border-radius: 4px;
|
91 |
+
color: white;
|
92 |
+
cursor: pointer;
|
93 |
+
}
|
94 |
+
|
95 |
+
button:hover {
|
96 |
+
background-color: #4a4a4a;
|
97 |
+
}
|
98 |
+
|
99 |
+
.comparison-columns {
|
100 |
+
display: flex;
|
101 |
+
justify-content: space-between;
|
102 |
+
gap: 20px;
|
103 |
+
}
|
104 |
+
|
105 |
+
.comparison-columns > div {
|
106 |
+
flex: 1;
|
107 |
+
}
|
108 |
+
|
109 |
+
.compare-button {
|
110 |
+
display: inline-block;
|
111 |
+
margin-top: 20px;
|
112 |
+
color: #8fb5dd;
|
113 |
+
text-decoration: none;
|
114 |
+
font-size: 0.9rem;
|
115 |
+
}
|
116 |
+
.compare-button:hover {
|
117 |
+
text-decoration: underline;
|
118 |
+
}
|
119 |
+
|