From 9fe5ee096ff4b1870eca6d4b31c61aa7abc9d13c Mon Sep 17 00:00:00 2001 From: Alex Cabrera Date: Fri, 29 Sep 2023 12:15:48 -0400 Subject: [PATCH] feat: add space-separated-values (#246) --- backend/zeno_backend/routers/sdk.py | 3 +- .../instance-views/views/viewMap.ts | 6 +- .../views/views/SpaceSeparatedValues.svelte | 74 +++++++++++++++++++ 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 frontend/src/lib/components/instance-views/views/views/SpaceSeparatedValues.svelte diff --git a/backend/zeno_backend/routers/sdk.py b/backend/zeno_backend/routers/sdk.py index fba09acb..ce2365d8 100644 --- a/backend/zeno_backend/routers/sdk.py +++ b/backend/zeno_backend/routers/sdk.py @@ -28,9 +28,10 @@ "code-generation", "image-classification", "image-segmentation", + "openai-chat-markdown", "openai-chat", + "space-separated-values", "text-classification", - "openai-chat-markdown", ] diff --git a/frontend/src/lib/components/instance-views/views/viewMap.ts b/frontend/src/lib/components/instance-views/views/viewMap.ts index 9fef223b..8815c237 100644 --- a/frontend/src/lib/components/instance-views/views/viewMap.ts +++ b/frontend/src/lib/components/instance-views/views/viewMap.ts @@ -7,18 +7,20 @@ import ImageClassification from './views/ImageClassification.svelte'; import ImageSegmentation from './views/ImageSegmentation.svelte'; import OpenAiChat from './views/OpenAIChat.svelte'; import OpenAiChatMarkdown from './views/OpenAIChatMarkdown.svelte'; +import SpaceSeparatedValues from './views/SpaceSeparatedValues.svelte'; import TextClassification from './views/TextClassification.svelte'; // MUST update /backend/zeno_backend/routers/sdk.py when adding new views export const viewMap: Record = { 'audio-transcription': AudioTranscription, - chatbot: Chatbot, 'code-generation': Codegen, 'image-classification': ImageClassification, 'image-segmentation': ImageSegmentation, + 'openai-chat-markdown': OpenAiChatMarkdown, 'openai-chat': OpenAiChat, + 'space-separated-values': SpaceSeparatedValues, 'text-classification': TextClassification, - 'openai-chat-markdown': OpenAiChatMarkdown + chatbot: Chatbot }; export const optionsMap: Record = { diff --git a/frontend/src/lib/components/instance-views/views/views/SpaceSeparatedValues.svelte b/frontend/src/lib/components/instance-views/views/views/SpaceSeparatedValues.svelte new file mode 100644 index 00000000..fe8174b5 --- /dev/null +++ b/frontend/src/lib/components/instance-views/views/views/SpaceSeparatedValues.svelte @@ -0,0 +1,74 @@ + + +{#await fetchData} + +{:then data} + + + {#each data as entry} + + + {#each entry as cell} + + {/each} + + {/each} + {#each labelEntries as entry} + + + {#each entry as cell} + + {/each} + + {/each} + {#if modelColumn} + {#each modelEntries as entry} + + + {#each entry as cell} + + {/each} + + {/each} + {/if} + +
Data: {cell}
Label: {cell}
Output: {cell}
+{/await} + +