iamAI123 commited on
Commit
aa72f04
1 Parent(s): d00a9dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,8 +5,9 @@ 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
 
12
  gr.Interface(fn=query, inputs='text', outputs = 'text').launch()
 
5
  headers = {"Authorization": "Bearer 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"}
6
 
7
  def query(txt):
8
+
9
  payload = {'inputs' : txt}
10
+ response = requests.post(API_URL, headers=headers, json=payload)
11
+ return response.json()
12
 
13
  gr.Interface(fn=query, inputs='text', outputs = 'text').launch()