aegis-backend / planner.py
shreyab21's picture
Create planner.py
9d6d156 verified
raw
history blame contribute delete
468 Bytes
# planner.py
from gradio_client import Client
# Connect to your Hugging Face Space
client = Client("shreyab21/aegis-reasoner")
def llama_reason(query: str) -> str:
"""
Sends the query to the remote Reasoner Space (on Hugging Face)
and returns the generated reasoning response.
"""
try:
result = client.predict(query=query, api_name="/predict")
return result
except Exception as e:
return f"⚠️ Reasoner error: {e}"