vietdata commited on
Commit
446384d
·
1 Parent(s): aed7d5e

first update

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
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