shreyab21 commited on
Commit
9d6d156
·
verified ·
1 Parent(s): 2dc8a8e

Create planner.py

Browse files
Files changed (1) hide show
  1. planner.py +16 -0
planner.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # planner.py
2
+ from gradio_client import Client
3
+
4
+ # Connect to your Hugging Face Space
5
+ client = Client("shreyab21/aegis-reasoner")
6
+
7
+ def llama_reason(query: str) -> str:
8
+ """
9
+ Sends the query to the remote Reasoner Space (on Hugging Face)
10
+ and returns the generated reasoning response.
11
+ """
12
+ try:
13
+ result = client.predict(query=query, api_name="/predict")
14
+ return result
15
+ except Exception as e:
16
+ return f"⚠️ Reasoner error: {e}"