Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,12 +9,12 @@ headers2 = {"Authorization": "Bearer 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"}
|
|
9 |
|
10 |
def query(payload):
|
11 |
response = requests.post(API_URL, headers=headers, json=payload)
|
12 |
-
return response.json()
|
13 |
|
14 |
def query2(question, context): # Accept two arguments
|
15 |
payload = {"question": question, "context": context}
|
16 |
response = requests.post(API_URL2, headers=headers2, json=payload)
|
17 |
-
return response.json()
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn=query2,
|
|
|
9 |
|
10 |
def query(payload):
|
11 |
response = requests.post(API_URL, headers=headers, json=payload)
|
12 |
+
return response.json()["answer"]
|
13 |
|
14 |
def query2(question, context): # Accept two arguments
|
15 |
payload = {"question": question, "context": context}
|
16 |
response = requests.post(API_URL2, headers=headers2, json=payload)
|
17 |
+
return response.json()["answer"]
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn=query2,
|