Spaces:
Paused
Paused
Commit
·
8287cd7
1
Parent(s):
4a30359
minor updates
Browse files- pages/main.py +15 -2
- var_app.py +5 -1
pages/main.py
CHANGED
|
@@ -38,6 +38,7 @@ load_dotenv()
|
|
| 38 |
from var_app import __version__
|
| 39 |
from var_app import LANGUAGES_EMOJI
|
| 40 |
from var_app import SUPPORTED_LANGUAGES
|
|
|
|
| 41 |
from core.core import translations
|
| 42 |
from core.core import get_translation
|
| 43 |
from core.converter import convert_iso6391_to_language_name
|
|
@@ -323,7 +324,6 @@ def main_page():
|
|
| 323 |
if st.button(f"Speech-To-Text"):
|
| 324 |
stt_settings(state__stt_voice_isolation=st.session_state.stt_voice_isolation)
|
| 325 |
|
| 326 |
-
|
| 327 |
if st.button(f"Text-To-Speech"):
|
| 328 |
tts_settings(
|
| 329 |
name__tts_voice = st.session_state.tts_voice,
|
|
@@ -363,7 +363,20 @@ def main_page():
|
|
| 363 |
st.session_state.user_input = st.chat_input(
|
| 364 |
get_translation("entrez_message")
|
| 365 |
)
|
| 366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
st.experimental_audio_input("Record a voice message",on_change=recorder_released, key="rec_widget")
|
| 368 |
|
| 369 |
if st.session_state.user_input:
|
|
|
|
| 38 |
from var_app import __version__
|
| 39 |
from var_app import LANGUAGES_EMOJI
|
| 40 |
from var_app import SUPPORTED_LANGUAGES
|
| 41 |
+
from var_app import CHAT_FILES_UPLOAD_ALLOWED_TYPES
|
| 42 |
from core.core import translations
|
| 43 |
from core.core import get_translation
|
| 44 |
from core.converter import convert_iso6391_to_language_name
|
|
|
|
| 324 |
if st.button(f"Speech-To-Text"):
|
| 325 |
stt_settings(state__stt_voice_isolation=st.session_state.stt_voice_isolation)
|
| 326 |
|
|
|
|
| 327 |
if st.button(f"Text-To-Speech"):
|
| 328 |
tts_settings(
|
| 329 |
name__tts_voice = st.session_state.tts_voice,
|
|
|
|
| 363 |
st.session_state.user_input = st.chat_input(
|
| 364 |
get_translation("entrez_message")
|
| 365 |
)
|
| 366 |
+
|
| 367 |
+
# Interface utilisateur pour l'upload de fichiers
|
| 368 |
+
#st.session_state.uploaded_files = st.file_uploader(
|
| 369 |
+
# "Choose files to upload",
|
| 370 |
+
# accept_multiple_files=True,
|
| 371 |
+
# type=CHAT_FILES_UPLOAD_ALLOWED_TYPES,
|
| 372 |
+
# key="chat_files_upload"
|
| 373 |
+
#)
|
| 374 |
+
#for uploaded_file in st.session_state.uploaded_files:
|
| 375 |
+
# bytes_data = uploaded_file.read()
|
| 376 |
+
# st.write("filename:", uploaded_file.name)
|
| 377 |
+
# st.write(bytes_data)
|
| 378 |
+
|
| 379 |
+
# Interface utilisateur pour l'enregistrement audio
|
| 380 |
st.experimental_audio_input("Record a voice message",on_change=recorder_released, key="rec_widget")
|
| 381 |
|
| 382 |
if st.session_state.user_input:
|
var_app.py
CHANGED
|
@@ -1,7 +1,11 @@
|
|
| 1 |
-
__version__ = "1.3.
|
| 2 |
|
| 3 |
from core.files import read_file
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# List of languages supported by the application
|
| 6 |
SUPPORTED_LANGUAGES = [
|
| 7 |
"Afrikaans", "Arabic", "Armenian", "Azerbaijani", "Belarusian", "Bosnian",
|
|
|
|
| 1 |
+
__version__ = "1.3.2"
|
| 2 |
|
| 3 |
from core.files import read_file
|
| 4 |
|
| 5 |
+
CHAT_FILES_UPLOAD_ALLOWED_TYPES = [
|
| 6 |
+
"txt"
|
| 7 |
+
]
|
| 8 |
+
|
| 9 |
# List of languages supported by the application
|
| 10 |
SUPPORTED_LANGUAGES = [
|
| 11 |
"Afrikaans", "Arabic", "Armenian", "Azerbaijani", "Belarusian", "Bosnian",
|