{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.\n" ] } ], "source": [ "import pickle\n", "import datasets\n", "from renumics import spotlight\n", "from renumics.spotlight import dtypes as spotlight_dtypes\n", "import os" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Dataset loaded using datasets.load_dataset().\n" ] } ], "source": [ "dataset_name=\"ai-aerospace/ac-text-embedding-ada-002-ams-test\"\n", "dataset = datasets.load_dataset(dataset_name, split=\"train\")\n", "print(\"Dataset loaded using datasets.load_dataset().\")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "view = spotlight.show(dataset, port=7860, host=\"0.0.0.0\", \n", " dtype={\"used_by_questions\": spotlight_dtypes.SequenceDType(spotlight_dtypes.str_dtype)}, \n", " allow_filebrowsing=False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.1" } }, "nbformat": 4, "nbformat_minor": 2 }