Spaces:
Runtime error
Runtime error
Download chainlit_app.py from NexusInstruments/omniscientframework: direct link, hf CLI and curl.
- Browser
- Download file 652 Bytes
-
https://huggingface.co/spaces/NexusInstruments/omniscientframework/resolve/main/chainlit_app.py
- Command line
-
hf download hf://spaces/NexusInstruments/omniscientframework/chainlit_app.py
-
curl -L -o chainlit_app.py https://huggingface.co/spaces/NexusInstruments/omniscientframework/resolve/main/chainlit_app.py
652 Bytes
| import chainlit as cl | |
| import sys, os | |
| # ─── Ensure utils/ is importable ────────────────────────────── | |
| ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) | |
| if ROOT_PATH not in sys.path: | |
| sys.path.insert(0, ROOT_PATH) | |
| from utils.backend import run_llm | |
| async def start(): | |
| await cl.Message(content="Hello 👋, I’m Omniscient! Ask me anything about logs, files, or scripts.").send() | |
| async def main(message: cl.Message): | |
| ai_input = message.content | |
| reply = run_llm(ai_input) | |
| # Send reply | |
| await cl.Message(content=reply).send() | |