invincible-jha
commited on
Commit
•
ca44685
1
Parent(s):
46e3bf1
Upload 2 files
Browse files
app.py
CHANGED
@@ -1,6 +1,14 @@
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
-
from models import ModelManager
|
3 |
-
from
|
|
|
|
|
|
|
|
|
4 |
|
5 |
# Initialize components
|
6 |
optimizer = GPUOptimizer()
|
@@ -27,7 +35,7 @@ def process_audio(audio_file):
|
|
27 |
# Format outputs
|
28 |
outputs = (
|
29 |
results['transcription'],
|
30 |
-
|
31 |
_format_indicators(results['mental_health_indicators'])
|
32 |
)
|
33 |
|
|
|
1 |
+
import os
|
2 |
+
import sys
|
3 |
+
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
4 |
+
|
5 |
import gradio as gr
|
6 |
+
from models.model_manager import ModelManager
|
7 |
+
from models.audio_processor import AudioProcessor
|
8 |
+
from models.analyzer import Analyzer
|
9 |
+
from utils.visualizer import create_emotion_plot
|
10 |
+
from utils.gpu_optimizer import GPUOptimizer
|
11 |
+
from utils.model_cache import ModelCache
|
12 |
|
13 |
# Initialize components
|
14 |
optimizer = GPUOptimizer()
|
|
|
35 |
# Format outputs
|
36 |
outputs = (
|
37 |
results['transcription'],
|
38 |
+
create_emotion_plot(results['emotions']['scores']),
|
39 |
_format_indicators(results['mental_health_indicators'])
|
40 |
)
|
41 |
|
setup.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from setuptools import setup, find_packages
|
2 |
+
|
3 |
+
setup(
|
4 |
+
name="vocal-biomarker",
|
5 |
+
version="0.1",
|
6 |
+
packages=find_packages(),
|
7 |
+
install_requires=[
|
8 |
+
"gradio==4.12.0",
|
9 |
+
"torch==2.1.0",
|
10 |
+
"transformers==4.36.0",
|
11 |
+
"librosa==0.10.1",
|
12 |
+
"numpy==1.24.3",
|
13 |
+
"plotly==5.18.0",
|
14 |
+
"scipy==1.11.3",
|
15 |
+
"soundfile==0.12.1",
|
16 |
+
"pandas==2.1.1"
|
17 |
+
]
|
18 |
+
)
|