Lin0He commited on
Commit
8042c99
·
1 Parent(s): bf93966

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -2
README.md CHANGED
@@ -3,5 +3,24 @@ library_name: generic
3
  tags:
4
  - summarization
5
  ---
6
- This model is especially for short sentence summarization.
7
- Still working on deployment on hugging face.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  tags:
4
  - summarization
5
  ---
6
+
7
+ ### Interface
8
+ import requests
9
+
10
+ API_URL = "https://api-inference.huggingface.co/models/Lin0He/text-summary-gpt2-short"
11
+ headers = {"Authorization": "Bearer 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"}
12
+
13
+ def query(payload):
14
+ response = requests.post(API_URL, headers=headers, json=payload)
15
+ return response.json()
16
+
17
+ output = query({
18
+ "inputs": "Today was a beautiful day. I have down all my homework, and baked some cookies with my friends. What a lovely day."
19
+ })
20
+ print(output)
21
+
22
+
23
+
24
+
25
+
26
+