Spaces:
Sleeping
Sleeping
File size: 1,226 Bytes
8ed954c | 1 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 29 30 31 32 33 34 35 36 | import asyncio
from src.agent import app
async def main():
print("π Triggering the Advanced Agent Pipeline (USA)...")
# We pass the state to the compiled StateGraph
result = await app.ainvoke({"region": "USA", "retry_count": 0, "ticker": "NONE"})
print("\n" + "="*50)
print("π PIPELINE RESULTS")
print("="*50)
ticker = result.get('ticker', 'NONE')
status = result.get('status', 'FAIL')
verdict = result.get('final_verdict', 'No Verdict')
print(f"π― Target Acquired: {ticker}")
print(f"βοΈ Gatekeeper Status: {status}")
if status == 'PASS':
info = result.get('financial_data', {})
print(f"π° Price: ${info.get('currentPrice')}")
print(f"π Market Cap: ${info.get('marketCap', 0):,.0f}")
print(f"π Float Shares: {info.get('floatShares', 0):,.0f}")
print(f"π Insider Ownership: {info.get('heldPercentInsiders', 0) * 100:.1f}%")
print("\nπ§ SENIOR BROKER ANALYSIS:")
print(verdict)
else:
print(f"π Reason for failure: {result.get('financial_data', {}).get('reason', 'N/A')}")
print("="*50 + "\n")
if __name__ == "__main__":
asyncio.run(main())
|