Archisman Karmakar commited on
Commit
be58ecd
·
1 Parent(s): d93ded7

2025.03.18.post5

Browse files

2025.03.18.post5 MAJOR

app_main_hf.py CHANGED
@@ -1,18 +1,22 @@
 
 
 
 
1
  from streamlit_extras.bottom_container import bottom
2
  from streamlit_extras.app_logo import add_logo
3
  from streamlit_extras.add_vertical_space import add_vertical_space
4
  from streamlit_extras.stylable_container import stylable_container
5
-
6
  from imports import *
7
  import streamlit as st
8
  from streamlit_option_menu import option_menu
9
- import os
10
  import asyncio
11
- import sys
12
  import shutil
13
  import gc
14
  from transformers.utils.hub import TRANSFORMERS_CACHE
15
 
 
 
16
 
17
  try:
18
  asyncio.get_running_loop()
@@ -32,7 +36,7 @@ import joblib
32
  import importlib
33
  import importlib.util
34
 
35
- sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
36
 
37
 
38
  from emotion_analysis import show_emotion_analysis
 
1
+ import os
2
+ import sys
3
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
4
+
5
  from streamlit_extras.bottom_container import bottom
6
  from streamlit_extras.app_logo import add_logo
7
  from streamlit_extras.add_vertical_space import add_vertical_space
8
  from streamlit_extras.stylable_container import stylable_container
9
+ import torch
10
  from imports import *
11
  import streamlit as st
12
  from streamlit_option_menu import option_menu
 
13
  import asyncio
 
14
  import shutil
15
  import gc
16
  from transformers.utils.hub import TRANSFORMERS_CACHE
17
 
18
+ # torch.classes.__path__ = []
19
+
20
 
21
  try:
22
  asyncio.get_running_loop()
 
36
  import importlib
37
  import importlib.util
38
 
39
+ # sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
40
 
41
 
42
  from emotion_analysis import show_emotion_analysis
dashboard.py CHANGED
@@ -1,10 +1,13 @@
 
 
 
 
1
  import streamlit as st
2
  from transformers.utils.hub import TRANSFORMERS_CACHE
3
  import shutil
4
  import torch
5
  import psutil
6
  import gc
7
- import os
8
 
9
  def free_memory():
10
  # """Free up CPU & GPU memory before loading a new model."""
 
1
+ import os
2
+ import sys
3
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
4
+
5
  import streamlit as st
6
  from transformers.utils.hub import TRANSFORMERS_CACHE
7
  import shutil
8
  import torch
9
  import psutil
10
  import gc
 
11
 
12
  def free_memory():
13
  # """Free up CPU & GPU memory before loading a new model."""
imports.py CHANGED
@@ -1,6 +1,11 @@
 
 
 
 
 
1
  import streamlit as st
2
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoModel, DebertaV2Tokenizer, DebertaV2ForSequenceClassification
3
- import torch
4
  import numpy as np
5
  import matplotlib.pyplot as plt
6
  import plotly.express as px
@@ -14,7 +19,4 @@ import importlib.util
14
  import asyncio
15
  import sys
16
  import pytorch_lightning as pl
17
- from transformers.utils.hub import TRANSFORMERS_CACHE
18
-
19
-
20
- sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
 
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
5
+
6
  import streamlit as st
7
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoModel, DebertaV2Tokenizer, DebertaV2ForSequenceClassification
8
+ # import torch
9
  import numpy as np
10
  import matplotlib.pyplot as plt
11
  import plotly.express as px
 
19
  import asyncio
20
  import sys
21
  import pytorch_lightning as pl
22
+ from transformers.utils.hub import TRANSFORMERS_CACHE
 
 
 
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
  [project]
2
  name = "tachygraphy-microtext-analysis-and-normalization"
3
- version = "2025.03.18.post3"
4
  description = ""
5
  authors = [
6
  { name = "Archisman Karmakar", email = "[email protected]" },
 
1
  [project]
2
  name = "tachygraphy-microtext-analysis-and-normalization"
3
+ version = "2025.03.18.post5"
4
  description = ""
5
  authors = [
6
  { name = "Archisman Karmakar", email = "[email protected]" },
pyprojectOLD.toml CHANGED
@@ -1,6 +1,8 @@
1
  [project]
2
  name = "tachygraphy-microtext-analysis-and-normalization"
3
- version = "2025.03.18.post2"
 
 
4
  # version = "2025.03.18.post1"
5
  # version = "2025.03.17.post1"
6
  # version = "2025.03.16.post3"
 
1
  [project]
2
  name = "tachygraphy-microtext-analysis-and-normalization"
3
+ version = "2025.03.18.post4_3"
4
+ # version = "2025.03.18.post3"
5
+ # version = "2025.03.18.post2"
6
  # version = "2025.03.18.post1"
7
  # version = "2025.03.17.post1"
8
  # version = "2025.03.16.post3"
requirements.txt CHANGED
@@ -155,8 +155,8 @@ pyproject-hooks==1.2.0 ; python_version >= "3.12"
155
  python-dateutil==2.9.0.post0 ; python_version >= "3.12"
156
  pytorch-lightning==2.5.0.post0 ; python_version >= "3.12"
157
  pytz==2025.1 ; python_version >= "3.12"
158
- pywin32-ctypes==0.2.3 ; python_version >= "3.12"
159
- pywin32==309 ; python_version >= "3.12"
160
  pyyaml==6.0.2 ; python_version >= "3.12"
161
  pyzmq==26.3.0 ; python_version >= "3.12"
162
  rapidfuzz==3.12.2 ; python_version >= "3.12"
 
155
  python-dateutil==2.9.0.post0 ; python_version >= "3.12"
156
  pytorch-lightning==2.5.0.post0 ; python_version >= "3.12"
157
  pytz==2025.1 ; python_version >= "3.12"
158
+ pywin32-ctypes==0.2.3 ; python_version >= "3.12" and sys_platform == "win32"
159
+ pywin32==309 ; python_version >= "3.12" and sys_platform == "win32"
160
  pyyaml==6.0.2 ; python_version >= "3.12"
161
  pyzmq==26.3.0 ; python_version >= "3.12"
162
  rapidfuzz==3.12.2 ; python_version >= "3.12"
sentiment_analysis/hmv_cfg_base_stage1/imports.py CHANGED
@@ -1,6 +1,11 @@
 
 
 
 
 
1
  import streamlit as st
2
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoModel, DebertaV2Tokenizer, DebertaV2ForSequenceClassification, DebertaV2Model
3
- import torch
4
  import numpy as np
5
  import matplotlib.pyplot as plt
6
  import plotly.express as px
@@ -8,12 +13,10 @@ import pandas as pd
8
  import json
9
  import gc
10
  import psutil
11
- import os
12
  import importlib
13
  import importlib.util
14
  import asyncio
15
- import sys
16
- import pytorch_lightning as pl
17
 
18
  import safetensors
19
  from safetensors import load_file, save_file
 
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
5
+
6
  import streamlit as st
7
  from transformers import AutoTokenizer, AutoModelForSequenceClassification, AutoModel, DebertaV2Tokenizer, DebertaV2ForSequenceClassification, DebertaV2Model
8
+ # import torch
9
  import numpy as np
10
  import matplotlib.pyplot as plt
11
  import plotly.express as px
 
13
  import json
14
  import gc
15
  import psutil
 
16
  import importlib
17
  import importlib.util
18
  import asyncio
19
+ # import pytorch_lightning as pl
 
20
 
21
  import safetensors
22
  from safetensors import load_file, save_file
sentiment_analysis/hmv_cfg_base_stage1/model1.py CHANGED
@@ -1,10 +1,18 @@
 
 
 
 
 
 
 
 
 
1
  import torch.nn as nn
2
  from imports import *
3
  import torch.nn.functional as F
4
 
5
 
6
- BASE_DIR = os.path.dirname(os.path.abspath(__file__))
7
- CONFIG_STAGE1 = os.path.join(BASE_DIR, "..", "config", "stage1_models.json")
8
 
9
  MODEL_OPTIONS = {
10
  "1": {
 
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
5
+
6
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
7
+ CONFIG_STAGE1 = os.path.join(BASE_DIR, "..", "config", "stage1_models.json")
8
+
9
+ import torch
10
  import torch.nn as nn
11
  from imports import *
12
  import torch.nn.functional as F
13
 
14
 
15
+
 
16
 
17
  MODEL_OPTIONS = {
18
  "1": {
sentiment_analysis/hmv_cfg_base_stage1/model2.py CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  from imports import *
2
 
3
  import importlib.util
@@ -15,8 +19,6 @@ import json
15
  from huggingface_hub import hf_hub_download
16
  from safetensors.torch import save_file, safe_open
17
 
18
- sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
19
-
20
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
21
  CONFIG_STAGE1 = os.path.join(BASE_DIR, "..", "config", "stage1_models.json")
22
 
 
1
+ import os
2
+ import sys
3
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
4
+
5
  from imports import *
6
 
7
  import importlib.util
 
19
  from huggingface_hub import hf_hub_download
20
  from safetensors.torch import save_file, safe_open
21
 
 
 
22
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
23
  CONFIG_STAGE1 = os.path.join(BASE_DIR, "..", "config", "stage1_models.json")
24
 
sentiment_analysis/hmv_cfg_base_stage1/model3.py CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  from imports import *
2
 
3
  import importlib.util
@@ -15,7 +20,6 @@ import json
15
  from huggingface_hub import hf_hub_download
16
  from safetensors.torch import save_file, safe_open
17
 
18
- sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
19
 
20
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
21
  CONFIG_STAGE1 = os.path.join(BASE_DIR, "..", "config", "stage1_models.json")
 
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
5
+
6
  from imports import *
7
 
8
  import importlib.util
 
20
  from huggingface_hub import hf_hub_download
21
  from safetensors.torch import save_file, safe_open
22
 
 
23
 
24
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
25
  CONFIG_STAGE1 = os.path.join(BASE_DIR, "..", "config", "stage1_models.json")
sentiment_analysis/sentiment_analysis_main.py CHANGED
@@ -1,15 +1,20 @@
 
 
 
 
 
1
  from imports import *
2
  import importlib.util
3
  import os
4
  import sys
5
  import joblib
6
  import time
 
7
  # from transformers.utils import move_cache_to_trash
8
  # from huggingface_hub import delete_cache
9
  from transformers.utils.hub import TRANSFORMERS_CACHE
10
  import shutil
11
 
12
- sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
13
 
14
  # from hmv_cfg_base_stage1.model1 import load_model as load_model1
15
  # from hmv_cfg_base_stage1.model1 import predict as predict1
 
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
5
+
6
  from imports import *
7
  import importlib.util
8
  import os
9
  import sys
10
  import joblib
11
  import time
12
+ import torch
13
  # from transformers.utils import move_cache_to_trash
14
  # from huggingface_hub import delete_cache
15
  from transformers.utils.hub import TRANSFORMERS_CACHE
16
  import shutil
17
 
 
18
 
19
  # from hmv_cfg_base_stage1.model1 import load_model as load_model1
20
  # from hmv_cfg_base_stage1.model1 import predict as predict1