Milad Alshomary
commited on
Commit
·
75cc8bf
1
Parent(s):
b15ed38
updating the embedding space
Browse files- app.py +1 -1
- config/config.yaml +2 -2
app.py
CHANGED
@@ -58,7 +58,7 @@ def app(share=False, use_cluster_feats=False):
|
|
58 |
instances, instance_ids = get_instances(cfg['instances_to_explain_path'])
|
59 |
|
60 |
interp = load_interp_space(cfg)
|
61 |
-
clustered_authors_df = interp['clustered_authors_df'][:
|
62 |
clustered_authors_df['fullText'] = clustered_authors_df['fullText'].map(lambda l: l[:3]) # Take at most 3 texts per author
|
63 |
|
64 |
with gr.Blocks(title="Author Attribution Explainability Tool") as demo:
|
|
|
58 |
instances, instance_ids = get_instances(cfg['instances_to_explain_path'])
|
59 |
|
60 |
interp = load_interp_space(cfg)
|
61 |
+
clustered_authors_df = interp['clustered_authors_df'][:1000]
|
62 |
clustered_authors_df['fullText'] = clustered_authors_df['fullText'].map(lambda l: l[:3]) # Take at most 3 texts per author
|
63 |
|
64 |
with gr.Blocks(title="Author Attribution Explainability Tool") as demo:
|
config/config.yaml
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
# config.yaml
|
2 |
instances_to_explain_path: "./datasets/hrs_explanations.json"
|
3 |
instances_to_explain_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/hrs_explanations_luar_clusters_18_balanced.json?/download=true"
|
4 |
-
interp_space_path: "./datasets/
|
5 |
-
interp_space_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/
|
6 |
gram2vec_feats_path: "./datasets/gram2vec_feats.csv"
|
7 |
gram2vec_feats_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/gram2vec_feats.csv?download=true"
|
8 |
|
|
|
1 |
# config.yaml
|
2 |
instances_to_explain_path: "./datasets/hrs_explanations.json"
|
3 |
instances_to_explain_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/hrs_explanations_luar_clusters_18_balanced.json?/download=true"
|
4 |
+
interp_space_path: "./datasets/sentence_luar_interp_clusters_25/"
|
5 |
+
interp_space_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/sentence_luar_interp_clusters_25.zip?download=true"
|
6 |
gram2vec_feats_path: "./datasets/gram2vec_feats.csv"
|
7 |
gram2vec_feats_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/gram2vec_feats.csv?download=true"
|
8 |
|