AI-Spock commited on
Commit
d986501
1 Parent(s): 9901480

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -1,5 +1,16 @@
1
 
 
2
 
 
 
 
 
 
 
 
 
 
 
3
 
4
 
5
  # Use a pipeline as a high-level helper
 
1
 
2
+ import requests
3
 
4
+ API_URL = "https://api-inference.huggingface.co/models/casehold/custom-legalbert"
5
+ headers = {"Authorization": "Bearer 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"}
6
+
7
+ def query(payload):
8
+ response = requests.post(API_URL, headers=headers, json=payload)
9
+ return response.json()
10
+
11
+ output = query({
12
+ "inputs": "The answer to the universe is [MASK].",
13
+ })
14
 
15
 
16
  # Use a pipeline as a high-level helper