Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -13,8 +13,11 @@ dataseteCQM = load_dataset("awacke1/eCQM-Code-Value-Semantic-Set.csv")
|
|
13 |
from transformers import AutoTokenizer
|
14 |
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
|
15 |
dataset = datasetLOINC.map(lambda examples: tokenizer(examples["Description"]), batched=True)
|
16 |
-
|
17 |
|
|
|
|
|
|
|
18 |
print(datasetLOINC)
|
19 |
print(datasetSNOMED)
|
20 |
print(dataseteCQM)
|
@@ -34,7 +37,7 @@ import gradio as gr
|
|
34 |
|
35 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
36 |
CHOICES = ["SNOMED", "LOINC", "CQM"]
|
37 |
-
|
38 |
|
39 |
|
40 |
def profile_dataset(dataset=datasetSNOMED, username="awacke1", token=HF_TOKEN, dataset_name="awacke1/SNOMED-CT-Code-Value-Semantic-Set.csv"):
|
|
|
13 |
from transformers import AutoTokenizer
|
14 |
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
|
15 |
dataset = datasetLOINC.map(lambda examples: tokenizer(examples["Description"]), batched=True)
|
16 |
+
JSONOBJ2=dataset['train'][0]
|
17 |
|
18 |
+
sw = datasetLOINC.filter(lambda example: example["Description"].startswith("Allergy"))
|
19 |
+
len(sw)
|
20 |
+
print(sw)
|
21 |
print(datasetLOINC)
|
22 |
print(datasetSNOMED)
|
23 |
print(dataseteCQM)
|
|
|
37 |
|
38 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
39 |
CHOICES = ["SNOMED", "LOINC", "CQM"]
|
40 |
+
JSONOBJ = """{"items":{"item":[{"id": "0001","type": null,"is_good": false,"ppu": 0.55,"batters":{"batter":[{ "id": "1001", "type": "Regular" },{ "id": "1002", "type": "Chocolate" },{ "id": "1003", "type": "Blueberry" },{ "id": "1004", "type": "Devil's Food" }]},"topping":[{ "id": "5001", "type": "None" },{ "id": "5002", "type": "Glazed" },{ "id": "5005", "type": "Sugar" },{ "id": "5007", "type": "Powdered Sugar" },{ "id": "5006", "type": "Chocolate with Sprinkles" },{ "id": "5003", "type": "Chocolate" },{ "id": "5004", "type": "Maple" }]}]}}"""
|
41 |
|
42 |
|
43 |
def profile_dataset(dataset=datasetSNOMED, username="awacke1", token=HF_TOKEN, dataset_name="awacke1/SNOMED-CT-Code-Value-Semantic-Set.csv"):
|