kingam commited on
Commit
3b7a7ae
1 Parent(s): c947708

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,6 +7,8 @@ import streamlit as st
7
  from datasets import Dataset, get_dataset_infos, load_dataset
8
 
9
  BASE_DATASET: str = "lion-ai/pl_med_data"
 
 
10
 
11
  dataset_names_map: Dict[str, str] = {
12
  "znany_lekarz": "Porady - pytania i odpowiedzi",
@@ -31,7 +33,7 @@ def list_datasets() -> Dict[str, Dataset]:
31
  def show_examples(dataset_name: str, split: str) -> None:
32
  dataset_name = reverse_dataset_names_map.get(dataset_name, dataset_name)
33
 
34
- dataset: Dataset = load_dataset(BASE_DATASET, dataset_name, split=f"{split}[:10]")
35
  st.data_editor(dataset.to_pandas(), use_container_width=True)
36
 
37
 
 
7
  from datasets import Dataset, get_dataset_infos, load_dataset
8
 
9
  BASE_DATASET: str = "lion-ai/pl_med_data"
10
+ read_key = os.environ.get('HF_TOKEN', None)
11
+
12
 
13
  dataset_names_map: Dict[str, str] = {
14
  "znany_lekarz": "Porady - pytania i odpowiedzi",
 
33
  def show_examples(dataset_name: str, split: str) -> None:
34
  dataset_name = reverse_dataset_names_map.get(dataset_name, dataset_name)
35
 
36
+ dataset: Dataset = load_dataset(BASE_DATASET, dataset_name, split=f"{split}[:10]", use_auth_token=read_key)
37
  st.data_editor(dataset.to_pandas(), use_container_width=True)
38
 
39