Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ import os
|
|
12 |
|
13 |
API_KEY = os.environ.get("API_KEY")
|
14 |
|
15 |
-
API_URL = "https://api-inference.huggingface.co/models/
|
16 |
headers = {"Authorization": "Bearer " + API_KEY}
|
17 |
|
18 |
def query(payload):
|
@@ -20,7 +20,10 @@ def query(payload):
|
|
20 |
return response.json()
|
21 |
|
22 |
output = query({
|
23 |
-
"inputs":
|
|
|
|
|
|
|
24 |
})
|
25 |
|
26 |
st.write(output)
|
|
|
12 |
|
13 |
API_KEY = os.environ.get("API_KEY")
|
14 |
|
15 |
+
API_URL = "API_URL = "https://api-inference.huggingface.co/models/google-bert/bert-large-uncased-whole-word-masking-finetuned-squad"
|
16 |
headers = {"Authorization": "Bearer " + API_KEY}
|
17 |
|
18 |
def query(payload):
|
|
|
20 |
return response.json()
|
21 |
|
22 |
output = query({
|
23 |
+
"inputs": {
|
24 |
+
"question": "What is my name?",
|
25 |
+
"context": "My name is Clara and I live in Berkeley."
|
26 |
+
}
|
27 |
})
|
28 |
|
29 |
st.write(output)
|