Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix load text
  • Loading branch information
CodingWithTim committed Jan 19, 2024
commit a07060f5f4de89f70d38af237d32bee38579328b
6 changes: 3 additions & 3 deletions fastchat/serve/monitor/topic_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ def get_cluster_info(texts, labels, topk_indices):
show_top_k = args.show_top_k
show_cut_off = args.show_cut_off

texts = read_texts(
args.input_file, args.min_length, args.max_length, args.english_only
)
if args.embeddings_file is None:
texts = read_texts(
args.input_file, args.min_length, args.max_length, args.english_only
)
print(f"#text: {len(texts)}")
embeddings = get_embeddings(texts, args.model, args.batch_size)
print(f"embeddings shape: {embeddings.shape}")
Expand Down