Spaces:
Sleeping
Sleeping
Commit
·
714138b
1
Parent(s):
d4a1eae
Add Gradio app and Spaces
Browse filesEADME.md
n progress; onto d4a1eae
README.md
CHANGED
|
@@ -1,12 +1,9 @@
|
|
| 1 |
---
|
| 2 |
title: Eidolon Cognitive Tutor
|
| 3 |
emoji: 🧠
|
| 4 |
-
colorFrom: blue
|
| 5 |
-
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
-
|
| 10 |
---
|
| 11 |
|
| 12 |
# Cognitive LLM with Qwen3
|
|
@@ -31,6 +28,7 @@ A simple implementation of a cognitive language model using Qwen3-7B-Instruct fr
|
|
| 31 |
|
| 32 |
1. Clone this repository
|
| 33 |
2. Install the required packages:
|
|
|
|
| 34 |
```bash
|
| 35 |
pip install -r requirements.txt
|
| 36 |
```
|
|
@@ -38,6 +36,7 @@ A simple implementation of a cognitive language model using Qwen3-7B-Instruct fr
|
|
| 38 |
## Usage
|
| 39 |
|
| 40 |
1. Run the interactive CLI:
|
|
|
|
| 41 |
```bash
|
| 42 |
python cognitive_llm.py
|
| 43 |
```
|
|
|
|
| 1 |
---
|
| 2 |
title: Eidolon Cognitive Tutor
|
| 3 |
emoji: 🧠
|
|
|
|
|
|
|
| 4 |
sdk: gradio
|
|
|
|
| 5 |
app_file: app.py
|
| 6 |
+
license: apache-2.0
|
| 7 |
---
|
| 8 |
|
| 9 |
# Cognitive LLM with Qwen3
|
|
|
|
| 28 |
|
| 29 |
1. Clone this repository
|
| 30 |
2. Install the required packages:
|
| 31 |
+
|
| 32 |
```bash
|
| 33 |
pip install -r requirements.txt
|
| 34 |
```
|
|
|
|
| 36 |
## Usage
|
| 37 |
|
| 38 |
1. Run the interactive CLI:
|
| 39 |
+
|
| 40 |
```bash
|
| 41 |
python cognitive_llm.py
|
| 42 |
```
|
app.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from cognitive_llm import CognitiveLLM
|
| 3 |
+
|
| 4 |
+
# Initialize the cognitive tutor
|
| 5 |
+
_tutor = CognitiveLLM()
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ask(question: str) -> str:
|
| 9 |
+
"""Generate a response from the cognitive tutor."""
|
| 10 |
+
if not question or not question.strip():
|
| 11 |
+
return "Please enter a question for the tutor."
|
| 12 |
+
return _tutor.generate(question.strip())
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
iface = gr.Interface(
|
| 16 |
+
fn=ask,
|
| 17 |
+
inputs=gr.Textbox(label="Ask the tutor", placeholder="Enter your question here"),
|
| 18 |
+
outputs=gr.Textbox(label="Tutor response"),
|
| 19 |
+
title="Eidolon Cognitive Tutor",
|
| 20 |
+
description="Retrieval-augmented cognitive tutoring powered by Qwen3."
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
if __name__ == "__main__":
|
| 25 |
+
iface.launch()
|