Spaces:
Paused
Paused
Commit
·
acc179d
1
Parent(s):
2445440
updated
Browse files
backend/services/interview_engine.py
CHANGED
|
@@ -9,6 +9,14 @@ import tempfile
|
|
| 9 |
import shutil
|
| 10 |
import torch
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# Initialize models
|
| 13 |
chat_groq_api = os.getenv("GROQ_API_KEY")
|
| 14 |
|
|
@@ -79,6 +87,8 @@ def load_whisper_model():
|
|
| 79 |
whisper_model = WhisperModel(model_name if 'model_name' in locals() else "tiny", device="cpu", compute_type="int8")
|
| 80 |
return whisper_model
|
| 81 |
|
|
|
|
|
|
|
| 82 |
def generate_first_question(profile, job):
|
| 83 |
"""Generate the first interview question based on profile and job"""
|
| 84 |
try:
|
|
|
|
| 9 |
import shutil
|
| 10 |
import torch
|
| 11 |
|
| 12 |
+
if torch.cuda.is_available():
|
| 13 |
+
print("🔥 CUDA Available")
|
| 14 |
+
print(torch.cuda.get_device_name(0))
|
| 15 |
+
print("cuDNN version:", torch.backends.cudnn.version())
|
| 16 |
+
else:
|
| 17 |
+
print("❌ CUDA Not Available")
|
| 18 |
+
|
| 19 |
+
|
| 20 |
# Initialize models
|
| 21 |
chat_groq_api = os.getenv("GROQ_API_KEY")
|
| 22 |
|
|
|
|
| 87 |
whisper_model = WhisperModel(model_name if 'model_name' in locals() else "tiny", device="cpu", compute_type="int8")
|
| 88 |
return whisper_model
|
| 89 |
|
| 90 |
+
load_whisper_model()
|
| 91 |
+
|
| 92 |
def generate_first_question(profile, job):
|
| 93 |
"""Generate the first interview question based on profile and job"""
|
| 94 |
try:
|