Spaces:
Running
Running
first update
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from datasets import load_dataset, Dataset
|
|
3 |
from collections import defaultdict
|
4 |
import random
|
5 |
import requests
|
6 |
-
|
7 |
# Load the source dataset
|
8 |
source_dataset = load_dataset("vietdata/eng_echo", split="train")
|
9 |
source_texts = source_dataset["query"]
|
@@ -18,8 +18,8 @@ def authenticate(user_id):
|
|
18 |
headers = {
|
19 |
"Content-Type": "application/json",
|
20 |
"Accept": "application/json",
|
21 |
-
"X-Public-Api-Key":
|
22 |
-
|
23 |
payload = { "token": "NPldirErwCHb6ZB5NZ9WW0UDmlr3jxxJ" }
|
24 |
response = requests.post(url, json=payload, headers=headers)
|
25 |
|
|
|
3 |
from collections import defaultdict
|
4 |
import random
|
5 |
import requests
|
6 |
+
import os
|
7 |
# Load the source dataset
|
8 |
source_dataset = load_dataset("vietdata/eng_echo", split="train")
|
9 |
source_texts = source_dataset["query"]
|
|
|
18 |
headers = {
|
19 |
"Content-Type": "application/json",
|
20 |
"Accept": "application/json",
|
21 |
+
"X-Public-Api-Key": os.environ['ADMIN']
|
22 |
+
}
|
23 |
payload = { "token": "NPldirErwCHb6ZB5NZ9WW0UDmlr3jxxJ" }
|
24 |
response = requests.post(url, json=payload, headers=headers)
|
25 |
|