FerrellSyntheticIntelligence commited on
Commit ·
8adfa22
1
Parent(s): b9e4b7b
Feature: Add Gradio web interface for professional UI
Browse files- app.py +16 -15
- requirements.txt +1 -4
app.py
CHANGED
|
@@ -1,20 +1,21 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from src.core.memory_engine import MemoryEngine
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
brain.ingest_knowledge('storage/knowledge')
|
| 7 |
|
| 8 |
-
def
|
| 9 |
-
|
| 10 |
-
response = brain.query(user_message)
|
| 11 |
-
return f"[VITALIS_CORE_UI]: {response}"
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
+
def train_engine():
|
| 4 |
+
return "Training initiated..."
|
|
|
|
| 5 |
|
| 6 |
+
def deploy_engine():
|
| 7 |
+
return "Engine deployed to production."
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
with gr.Blocks() as demo:
|
| 10 |
+
gr.Markdown("# Vitalis Core Engine")
|
| 11 |
+
with gr.Row():
|
| 12 |
+
btn_download = gr.Button("Download Model")
|
| 13 |
+
btn_train = gr.Button("Train Engine")
|
| 14 |
+
btn_deploy = gr.Button("Deploy")
|
| 15 |
+
|
| 16 |
+
output = gr.Textbox(label="Status")
|
| 17 |
+
|
| 18 |
+
btn_train.click(train_engine, outputs=output)
|
| 19 |
+
btn_deploy.click(deploy_engine, outputs=output)
|
| 20 |
|
| 21 |
+
demo.launch()
|
|
|
requirements.txt
CHANGED
|
@@ -1,4 +1 @@
|
|
| 1 |
-
gradio
|
| 2 |
-
sentence-transformers
|
| 3 |
-
faiss-cpu
|
| 4 |
-
numpy
|
|
|
|
| 1 |
+
gradio
|
|
|
|
|
|
|
|
|