Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from whale_core import parser, agents
|
2 |
+
|
3 |
+
print("🐋 Welcome to HuggingWhale.AI")
|
4 |
+
print("Drop your chaos here and we'll pretend to make sense of it...\n")
|
5 |
+
|
6 |
+
# Fake file parsing (replace with actual PDF path)
|
7 |
+
doc = parser.parse_file("examples/sample.pdf")
|
8 |
+
chunks = parser.chunk_and_embed(doc)
|
9 |
+
|
10 |
+
# Load your agents
|
11 |
+
agent_cfgs = agents.load_agents("agents/config.yaml")
|
12 |
+
|
13 |
+
# Simulate agent convo
|
14 |
+
responses = agents.run_agents_on_text(agent_cfgs, doc)
|
15 |
+
|
16 |
+
# Output agent responses
|
17 |
+
for name, reply in responses.items():
|
18 |
+
print(f"\n🤖 {name} says:\n{reply}")
|