Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import streamlit as st
|
|
| 3 |
import whisperx
|
| 4 |
import torch
|
| 5 |
from utils import convert_segments_object_to_text, check_password, convert_segments_object_to_text_simple
|
| 6 |
-
from gigiachat_requests import get_access_token, get_completion_from_gigachat, get_number_of_tokens
|
| 7 |
from openai_requests import get_completion_from_openai, process_transcribation_with_assistant
|
| 8 |
|
| 9 |
if check_password():
|
|
@@ -84,9 +84,8 @@ if check_password():
|
|
| 84 |
if (llm == 'GigaChat'):
|
| 85 |
number_of_tokens = get_number_of_tokens(transcript, access_token)
|
| 86 |
print('Количество токенов в транскрибации: ' + str(number_of_tokens))
|
| 87 |
-
transcript =
|
| 88 |
-
|
| 89 |
-
st.text(transcript)
|
| 90 |
|
| 91 |
elif (llm == 'Chat GPT'):
|
| 92 |
transcript = process_transcribation_with_assistant(processing_prompt, transcript)
|
|
|
|
| 3 |
import whisperx
|
| 4 |
import torch
|
| 5 |
from utils import convert_segments_object_to_text, check_password, convert_segments_object_to_text_simple
|
| 6 |
+
from gigiachat_requests import get_access_token, get_completion_from_gigachat, get_number_of_tokens, process_transcribation_with_gigachat
|
| 7 |
from openai_requests import get_completion_from_openai, process_transcribation_with_assistant
|
| 8 |
|
| 9 |
if check_password():
|
|
|
|
| 84 |
if (llm == 'GigaChat'):
|
| 85 |
number_of_tokens = get_number_of_tokens(transcript, access_token)
|
| 86 |
print('Количество токенов в транскрибации: ' + str(number_of_tokens))
|
| 87 |
+
transcript = process_transcribation_with_gigachat(processing_prompt, transcript, number_of_tokens + 1000, access_token)
|
| 88 |
+
print(transcript)
|
|
|
|
| 89 |
|
| 90 |
elif (llm == 'Chat GPT'):
|
| 91 |
transcript = process_transcribation_with_assistant(processing_prompt, transcript)
|