GuglielmoTor commited on
Commit
811c2ba
·
verified ·
1 Parent(s): 37c2a7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -28
app.py CHANGED
@@ -16,7 +16,8 @@ from gradio_utils import get_url_user_token
16
  # Functions from newly created/refactored modules
17
  from config import (
18
  LINKEDIN_CLIENT_ID_ENV_VAR, BUBBLE_APP_NAME_ENV_VAR,
19
- BUBBLE_API_KEY_PRIVATE_ENV_VAR, BUBBLE_API_ENDPOINT_ENV_VAR)
 
20
  from state_manager import process_and_store_bubble_token
21
  from sync_logic import sync_all_linkedin_data_orchestrator
22
  from ui_generators import (
@@ -37,33 +38,6 @@ from chatbot_handler import generate_llm_response
37
  # Configure logging
38
  logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(module)s - %(message)s')
39
 
40
- # Mapping from plot_configs IDs to PLOT_FORMULAS keys
41
- PLOT_ID_TO_FORMULA_KEY_MAP = {
42
- "posts_activity": "posts_activity",
43
- "mentions_activity": "mentions_activity",
44
- "mention_sentiment": "mention_sentiment",
45
- "followers_count": "followers_count_over_time",
46
- "followers_growth_rate": "followers_growth_rate",
47
- "followers_by_location": "followers_by_demographics",
48
- "followers_by_role": "followers_by_demographics",
49
- "followers_by_industry": "followers_by_demographics",
50
- "followers_by_seniority": "followers_by_demographics",
51
- "engagement_rate": "engagement_rate_over_time",
52
- "reach_over_time": "reach_over_time",
53
- "impressions_over_time": "impressions_over_time",
54
- "likes_over_time": "likes_over_time",
55
- "clicks_over_time": "clicks_over_time",
56
- "shares_over_time": "shares_over_time",
57
- "comments_over_time": "comments_over_time",
58
- "comments_sentiment": "comments_sentiment_breakdown",
59
- "post_frequency_cs": "post_frequency",
60
- "content_format_breakdown_cs": "content_format_breakdown",
61
- "content_topic_breakdown_cs": "content_topic_breakdown",
62
- "mention_analysis_volume": "mentions_activity",
63
- "mention_analysis_sentiment": "mention_sentiment"
64
- }
65
-
66
-
67
 
68
  # --- Gradio UI Blocks ---
69
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
 
16
  # Functions from newly created/refactored modules
17
  from config import (
18
  LINKEDIN_CLIENT_ID_ENV_VAR, BUBBLE_APP_NAME_ENV_VAR,
19
+ BUBBLE_API_KEY_PRIVATE_ENV_VAR, BUBBLE_API_ENDPOINT_ENV_VAR,
20
+ PLOT_ID_TO_FORMULA_KEY_MAP)
21
  from state_manager import process_and_store_bubble_token
22
  from sync_logic import sync_all_linkedin_data_orchestrator
23
  from ui_generators import (
 
38
  # Configure logging
39
  logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(module)s - %(message)s')
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  # --- Gradio UI Blocks ---
43
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),