vikaswr commited on
Commit
e17c3b3
1 Parent(s): 17c3070

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+
3
+ API_URL = "https://api-inference.huggingface.co/models/AdaptLLM/law-LLM"
4
+ API_TOKEN="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"
5
+ headers = {"Authorization": f"Bearer {API_TOKEN}"}
6
+
7
+
8
+ def query(payload):
9
+ response = requests.post(API_URL, headers=headers, json=payload)
10
+ return response.json()
11
+
12
+
13
+ output = query({
14
+ "inputs": "Can",
15
+ })
16
+ print(output)