Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ headers2 = {"Authorization": "Bearer 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"}
|
|
9 |
def query(q):
|
10 |
payload2 = "whats the context of the question " + q + " :"
|
11 |
response = requests.post(API_URL, headers=headers, json=payload2)
|
12 |
-
return response
|
13 |
def query2(q, c):
|
14 |
payload = {"question": q, "context": c}
|
15 |
response = requests.post(API_URL2, headers=headers2, json=payload)
|
|
|
9 |
def query(q):
|
10 |
payload2 = "whats the context of the question " + q + " :"
|
11 |
response = requests.post(API_URL, headers=headers, json=payload2)
|
12 |
+
return response #.json() #['answer']
|
13 |
def query2(q, c):
|
14 |
payload = {"question": q, "context": c}
|
15 |
response = requests.post(API_URL2, headers=headers2, json=payload)
|