Sari95 commited on
Commit
c4be13a
·
verified ·
1 Parent(s): 0313cd7

Update prompt instruction

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -15,7 +15,8 @@ def summarize_text(text):
15
 
16
  url = f"https://api-inference.huggingface.co/models/{MODEL_NAME}"
17
  headers = {"Authorization": f"Bearer {HF_API_KEY}"}
18
- payload = {"inputs": text}
 
19
 
20
  response = requests.post(url, headers=headers, json=payload)
21
 
 
15
 
16
  url = f"https://api-inference.huggingface.co/models/{MODEL_NAME}"
17
  headers = {"Authorization": f"Bearer {HF_API_KEY}"}
18
+ prompt = f"Summarize the following text in 5 sentences. Concentrate on the main points.:\n\n{text}"
19
+ payload = {"inputs": prompt}
20
 
21
  response = requests.post(url, headers=headers, json=payload)
22