KishanKumar001 commited on
Commit
887db57
·
1 Parent(s): 2393a9c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+
3
+ API_URL = "https://api-inference.huggingface.co/models/ahmedrachid/FinancialBERT-Sentiment-Analysis"
4
+ headers = {"Authorization": "Bearer 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"}
5
+
6
+ def query(payload):
7
+ response = requests.post(API_URL, headers=headers, json=payload)
8
+ return response.json()
9
+
10
+ output = query({
11
+ "inputs": "I like you. I love you",
12
+ })