|
from renumics import spotlight |
|
import pandas as pd |
|
|
|
|
|
if __name__ == "__main__": |
|
df = pd.read_json("sd_dataset_scored_embedded_parti.json") |
|
df["GitHub"] = '<a href="https://github.com/Renumics/spotlight" target="_blank">⭐ Star Spotlight on GitHub</a>' |
|
|
|
while True: |
|
dtypes = { |
|
"image": spotlight.Image, |
|
"clip_image_embedding": spotlight.Embedding, |
|
"clip_text_embedding": spotlight.Embedding, |
|
} |
|
view = spotlight.show( |
|
df, |
|
dtype=dtypes, |
|
port=7860, |
|
host="0.0.0.0", |
|
layout="spotlight-layout.json", |
|
allow_filebrowsing=False |
|
) |
|
|
|
view.close() |
|
|
|
|
|
|