iamAI123 commited on
Commit
d00a9dc
1 Parent(s): 381d8fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -4,7 +4,8 @@ import gradio as gr
4
  API_URL = "https://api-inference.huggingface.co/models/project-baize/baize-v2-7b"
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
 
 
4
  API_URL = "https://api-inference.huggingface.co/models/project-baize/baize-v2-7b"
5
  headers = {"Authorization": "Bearer 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"}
6
 
7
+ def query(txt):
8
+ payload = {'inputs' : txt}
9
  response = requests.post(API_URL, headers=headers, json=payload)
10
  return response.json()
11