Update main_process/salamandra_router.py
Browse files
main_process/salamandra_router.py
CHANGED
|
@@ -32,6 +32,8 @@ from asr_client import (
|
|
| 32 |
identificar_veu
|
| 33 |
)
|
| 34 |
|
|
|
|
|
|
|
| 35 |
from storage.common import validate_token
|
| 36 |
from storage.files.file_manager import FileManager
|
| 37 |
from storage.embeddings_routers import get_embeddings_json
|
|
@@ -41,11 +43,6 @@ from main_process.main_router import (
|
|
| 41 |
get_initial_srt_path
|
| 42 |
)
|
| 43 |
|
| 44 |
-
from schat_client import (
|
| 45 |
-
resumir_frases_salamandra,
|
| 46 |
-
identificar_personajes
|
| 47 |
-
)
|
| 48 |
-
|
| 49 |
EMBEDDINGS_ROOT = Path("/data/embeddings")
|
| 50 |
MEDIA_ROOT = Path("/data/media")
|
| 51 |
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
|
|
@@ -893,6 +890,8 @@ class UNE_Actor_prev:
|
|
| 893 |
|
| 894 |
class UNE_Actor:
|
| 895 |
def __call__(self, state: NState, srt_original_silence_con_ad_ocr_identity_une_1, srt_original_silence_con_ad_ocr_identity_une_2):
|
|
|
|
|
|
|
| 896 |
silence_dict = words_silence_srt(srt_original_silence_con_ad_ocr_identity_une_1)
|
| 897 |
|
| 898 |
with open(srt_original_silence_con_ad_ocr_identity_une_1, "r", encoding="utf-8-sig") as f:
|
|
@@ -1458,7 +1457,7 @@ async def generate_salamadra_result(
|
|
| 1458 |
messages_registro = [{"role": "system", "content": "Eres un agente que puede ejecutar herramientas Python usando las herramientas disponibles."}]
|
| 1459 |
|
| 1460 |
count = 1
|
| 1461 |
-
|
| 1462 |
user_prompt = "Ejecuta la funci贸n add_ad"
|
| 1463 |
#final_state, messages_registro = run_salamandra_agent(salamandraclient, state, tools, user_prompt, messages_registro, count)
|
| 1464 |
state = add_ad(state, temp_srt_files[0].name, temp_srt_files[1].name)
|
|
|
|
| 32 |
identificar_veu
|
| 33 |
)
|
| 34 |
|
| 35 |
+
from schat_client import resumir_frases_salamandra, identificar_personajes
|
| 36 |
+
|
| 37 |
from storage.common import validate_token
|
| 38 |
from storage.files.file_manager import FileManager
|
| 39 |
from storage.embeddings_routers import get_embeddings_json
|
|
|
|
| 43 |
get_initial_srt_path
|
| 44 |
)
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
EMBEDDINGS_ROOT = Path("/data/embeddings")
|
| 47 |
MEDIA_ROOT = Path("/data/media")
|
| 48 |
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
|
|
|
|
| 890 |
|
| 891 |
class UNE_Actor:
|
| 892 |
def __call__(self, state: NState, srt_original_silence_con_ad_ocr_identity_une_1, srt_original_silence_con_ad_ocr_identity_une_2):
|
| 893 |
+
print("UNE_Actor.__call__ iniciado")
|
| 894 |
+
|
| 895 |
silence_dict = words_silence_srt(srt_original_silence_con_ad_ocr_identity_une_1)
|
| 896 |
|
| 897 |
with open(srt_original_silence_con_ad_ocr_identity_une_1, "r", encoding="utf-8-sig") as f:
|
|
|
|
| 1457 |
messages_registro = [{"role": "system", "content": "Eres un agente que puede ejecutar herramientas Python usando las herramientas disponibles."}]
|
| 1458 |
|
| 1459 |
count = 1
|
| 1460 |
+
|
| 1461 |
user_prompt = "Ejecuta la funci贸n add_ad"
|
| 1462 |
#final_state, messages_registro = run_salamandra_agent(salamandraclient, state, tools, user_prompt, messages_registro, count)
|
| 1463 |
state = add_ad(state, temp_srt_files[0].name, temp_srt_files[1].name)
|