Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ API_URL = "https://api-inference.huggingface.co/models/tiiuae/falcon-7b-instruct
|
|
6 |
headers = {"Authorization": "Bearer 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"}
|
7 |
API_URL2 = "https://api-inference.huggingface.co/models/valhalla/longformer-base-4096-finetuned-squadv1"
|
8 |
headers2 = {"Authorization": "Bearer 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"}
|
9 |
-
def query(
|
10 |
-
payload2 = "whats the context of the question " +
|
11 |
response = requests.post(API_URL, headers=headers, json=payload2)
|
12 |
return response.json()['answer']
|
13 |
def query2(q, c):
|
|
|
6 |
headers = {"Authorization": "Bearer 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"}
|
7 |
API_URL2 = "https://api-inference.huggingface.co/models/valhalla/longformer-base-4096-finetuned-squadv1"
|
8 |
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.json()['answer']
|
13 |
def query2(q, c):
|