This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Dict, Any, List | |
from pathlib import Path | |
import yaml | |
import torch | |
import pytorch_lightning as pl | |
from torch.utils.data import DataLoader | |
from jina import Flow | |
from docarray import DocumentArray, Document | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nlu: | |
- intent: greet | |
examples: | |
- Hello | |
- Hi | |
- Hey | |
- intent: affirm | |
examples: | |
- "Yes" | |
- "Yes, that's right" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any, Dict, List | |
import yaml | |
from pathlib import Path | |
from jina import Executor, requests | |
from docarray import DocumentArray, Document | |
from docarray.score import NamedScore | |
import torch | |
import torch.nn.functional as F | |
from diet_classifier.config import DIETClassifierConfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jina import Flow | |
from docarray import DocumentArray, Document | |
from executor import DIETClassifierExecutor | |
f = Flow().add( | |
uses='jinahub+docker://ConveRTFeaturizer/latest' | |
).add( | |
uses=DIETClassifierExecutor, uses_with={ 'model_path': './lightning_logs/version_4/checkpoints/epoch=999-step=1000.ckpt' } | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
๐ Document: 390ade4aa6f98236224082851331c670 | |
โญโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ | |
โ Attribute โ Value โ | |
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | |
โ text โ Naw man โ | |
โ embedding โ โโโ โ | |
โฐโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ | |
โโโ ๐ถ Matches | |
โโโ ๐ Document: 626c8c7ed40279b4152aae627223e253 | |
โ โญโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
import datetime | |
events = [] | |
# Open the CSV | |
with open("portable_user_history-2024-06-02-csv.csv", "r") as f: | |
reader = csv.DictReader( | |
f, |
OlderNewer