Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
|
|
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 |
|