Milad Alshomary commited on
Commit
edc6c74
·
1 Parent(s): f61a01f
Files changed (2) hide show
  1. app.py +8 -8
  2. config/config.yaml +4 -5
app.py CHANGED
@@ -26,14 +26,14 @@ def load_config(path="config/config.yaml"):
26
  cfg = load_config()
27
 
28
 
29
- # download_file_override(cfg.get('interp_space_url'), cfg.get('interp_space_path'))
30
- # download_file_override(cfg.get('instances_to_explain_url'), cfg.get('instances_to_explain_path'))
31
- # download_file_override(cfg.get('gram2vec_feats_url'), cfg.get('gram2vec_feats_path'))
32
- # download_file_override(cfg.get('embeddings_cache_url'), cfg.get('embeddings_cache_path'))
33
- # download_file_override(cfg.get('zoom_cache_url'), cfg.get('zoom_cache_path'))
34
- # download_file_override(cfg.get('region_cache_url'), cfg.get('region_cache_path'))
35
- # download_file_override(cfg.get('tsne_cache_url'), cfg.get('tsne_cache_path'))
36
- # download_file_override(cfg.get('llm_style_features_cache_url'), cfg.get('llm_style_features_cache_path'))
37
 
38
  from utils.visualizations import *
39
  from utils.llm_feat_utils import *
 
26
  cfg = load_config()
27
 
28
 
29
+ download_file_override(cfg.get('interp_space_url'), cfg.get('interp_space_path'))
30
+ download_file_override(cfg.get('instances_to_explain_url'), cfg.get('instances_to_explain_path'))
31
+ download_file_override(cfg.get('gram2vec_feats_url'), cfg.get('gram2vec_feats_path'))
32
+ download_file_override(cfg.get('embeddings_cache_url'), cfg.get('embeddings_cache_path'))
33
+ download_file_override(cfg.get('zoom_cache_url'), cfg.get('zoom_cache_path'))
34
+ download_file_override(cfg.get('region_cache_url'), cfg.get('region_cache_path'))
35
+ download_file_override(cfg.get('tsne_cache_url'), cfg.get('tsne_cache_path'))
36
+ download_file_override(cfg.get('llm_style_features_cache_url'), cfg.get('llm_style_features_cache_path'))
37
 
38
  from utils.visualizations import *
39
  from utils.llm_feat_utils import *
config/config.yaml CHANGED
@@ -1,10 +1,10 @@
1
  # config.yaml
2
- #instances_to_explain_path: "./datasets/hrs_explanations_luar_clusters_2_35_balanced.json"
3
- #instances_to_explain_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/hrs_explanations_luar_clusters_2_35_balanced.json?download=true"
4
  instances_to_explain_path: "./datasets/reddit_explanation_sample.json"
5
 
6
- interp_space_path: "./datasets/sentence_luar_interp_space_2_35/"
7
- interp_space_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/sentence_luar_interp_space_2_35.zip?download=true"
8
 
9
  gram2vec_feats_path: "./datasets/gram2vec_feats.csv"
10
  gram2vec_feats_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/gram2vec_feats.csv?download=true"
@@ -24,7 +24,6 @@ tsne_cache_path: "./datasets/tsne_cache.pkl"
24
  llm_style_features_cache_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/feature_spans_cache.zip?download=true"
25
  llm_style_features_cache_path: "./datasets/feature_spans_cache/"
26
 
27
- background_authors_df_path: "./datasets/reddit_clustered_authors.pkl"
28
 
29
  style_feat_clm: "llm_tfidf_weights"
30
  top_k: 10
 
1
  # config.yaml
2
+
3
+ instances_to_explain_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/reddit_explanation_sample.json?download=true"
4
  instances_to_explain_path: "./datasets/reddit_explanation_sample.json"
5
 
6
+ background_authors_df_path: "./datasets/reddit_clustered_authors.pkl"
7
+ background_authors_df_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/reddit_clustered_authors.pkl?download=true"
8
 
9
  gram2vec_feats_path: "./datasets/gram2vec_feats.csv"
10
  gram2vec_feats_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/gram2vec_feats.csv?download=true"
 
24
  llm_style_features_cache_url: "https://huggingface.co/datasets/miladalsh/explanation_tool_files/resolve/main/feature_spans_cache.zip?download=true"
25
  llm_style_features_cache_path: "./datasets/feature_spans_cache/"
26
 
 
27
 
28
  style_feat_clm: "llm_tfidf_weights"
29
  top_k: 10