Compare commits
2 Commits
55319461e5
...
e2ac4495fd
| Author | SHA1 | Date | |
|---|---|---|---|
| e2ac4495fd | |||
| f3b48525e2 |
@@ -11,7 +11,7 @@ POSTGRES_DIR=
|
||||
|
||||
# JWT
|
||||
JWT_SECRET_KEY=
|
||||
JWT_ACCESS_TOKEN_EXPIRES=1200
|
||||
JWT_ACCESS_TOKEN_EXPIRES=28800
|
||||
|
||||
# Models
|
||||
HF_HOME=/models/huggingface
|
||||
|
||||
@@ -10,12 +10,6 @@ type FrequencyWord = {
|
||||
count: number;
|
||||
}
|
||||
|
||||
type AverageEmotionByTopic = {
|
||||
topic: string;
|
||||
n: number;
|
||||
[emotion: string]: string | number;
|
||||
}
|
||||
|
||||
type Vocab = {
|
||||
author: string;
|
||||
events: number;
|
||||
@@ -58,13 +52,25 @@ type HeatmapCell = {
|
||||
type TimeAnalysisResponse = {
|
||||
events_per_day: EventsPerDay[];
|
||||
weekday_hour_heatmap: HeatmapCell[];
|
||||
burstiness: number;
|
||||
}
|
||||
|
||||
// Content Analysis
|
||||
type NGram = {
|
||||
count: number;
|
||||
ngram: string;
|
||||
}
|
||||
|
||||
type AverageEmotionByTopic = {
|
||||
topic: string;
|
||||
n: number;
|
||||
[emotion: string]: string | number;
|
||||
}
|
||||
|
||||
type ContentAnalysisResponse = {
|
||||
word_frequencies: FrequencyWord[];
|
||||
average_emotion_by_topic: AverageEmotionByTopic[];
|
||||
common_three_phrases: NGram[];
|
||||
common_two_phrases: NGram[];
|
||||
}
|
||||
|
||||
// Summary
|
||||
|
||||
@@ -108,9 +108,7 @@ class StatGen:
|
||||
return {
|
||||
"top_users": self.interaction_analysis.top_users(filtered_df),
|
||||
"users": self.interaction_analysis.per_user_analysis(filtered_df),
|
||||
"interaction_graph": self.interaction_analysis.interaction_graph(
|
||||
filtered_df
|
||||
),
|
||||
"interaction_graph": self.interaction_analysis.interaction_graph(filtered_df)
|
||||
}
|
||||
|
||||
def get_interactional_analysis(self, df: pd.DataFrame, filters: dict | None = None) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user