Spaces:
Paused
Paused
rick
commited on
bug fixed now... not done...
Browse files- app.py +1 -1
- pages/main.py +15 -11
app.py
CHANGED
|
@@ -20,7 +20,7 @@ import streamlit as st
|
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
-
__version__ = "1.2.
|
| 24 |
|
| 25 |
# Au début du fichier, après les imports
|
| 26 |
st.set_page_config(
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
+
__version__ = "1.2.4"
|
| 24 |
|
| 25 |
# Au début du fichier, après les imports
|
| 26 |
st.set_page_config(
|
pages/main.py
CHANGED
|
@@ -24,7 +24,7 @@ from openai import OpenAI
|
|
| 24 |
from pydub import AudioSegment
|
| 25 |
|
| 26 |
|
| 27 |
-
__version__ = "1.2.
|
| 28 |
|
| 29 |
# Au début du fichier, après les imports
|
| 30 |
st.set_page_config(
|
|
@@ -580,7 +580,17 @@ def main_page():
|
|
| 580 |
|
| 581 |
with st.container(border=True):
|
| 582 |
# Interface utilisateur pour le chat textuel
|
| 583 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 584 |
|
| 585 |
# Réinitialiser l'état précédent
|
| 586 |
st.session_state.full_response = ""
|
|
@@ -693,13 +703,7 @@ def main_page():
|
|
| 693 |
|
| 694 |
# Interface utilisateur pour l'enregistrement audio
|
| 695 |
# st.write(f"🗣️ {get_translation('enregistrez_message')}")
|
| 696 |
-
elif audio
|
| 697 |
-
start_prompt=get_translation("cliquez_enregistrer"),
|
| 698 |
-
stop_prompt=get_translation("cliquez_arreter"),
|
| 699 |
-
pause_prompt=get_translation("cliquez_pause"),
|
| 700 |
-
show_visualizer=True,
|
| 701 |
-
key="vocal_chat_input"
|
| 702 |
-
):
|
| 703 |
# Traitement de l'entrée audio de l'utilisateur
|
| 704 |
if len(audio) > 0:
|
| 705 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio:
|
|
@@ -795,8 +799,8 @@ def main_page():
|
|
| 795 |
#if 'operation_prompt' in locals():
|
| 796 |
# del operation_prompt
|
| 797 |
|
| 798 |
-
if 'user_input' in locals():
|
| 799 |
-
|
| 800 |
if 'transcription' in locals():
|
| 801 |
del transcription
|
| 802 |
if 'operation_prompt' in locals():
|
|
|
|
| 24 |
from pydub import AudioSegment
|
| 25 |
|
| 26 |
|
| 27 |
+
__version__ = "1.2.4"
|
| 28 |
|
| 29 |
# Au début du fichier, après les imports
|
| 30 |
st.set_page_config(
|
|
|
|
| 580 |
|
| 581 |
with st.container(border=True):
|
| 582 |
# Interface utilisateur pour le chat textuel
|
| 583 |
+
user_input = st.chat_input(
|
| 584 |
+
get_translation("entrez_message")
|
| 585 |
+
)
|
| 586 |
+
audio = audiorecorder(
|
| 587 |
+
start_prompt=get_translation("cliquez_enregistrer"),
|
| 588 |
+
stop_prompt=get_translation("cliquez_arreter"),
|
| 589 |
+
pause_prompt=get_translation("cliquez_pause"),
|
| 590 |
+
show_visualizer=True,
|
| 591 |
+
key="vocal_chat_input"
|
| 592 |
+
)
|
| 593 |
+
if user_input:
|
| 594 |
|
| 595 |
# Réinitialiser l'état précédent
|
| 596 |
st.session_state.full_response = ""
|
|
|
|
| 703 |
|
| 704 |
# Interface utilisateur pour l'enregistrement audio
|
| 705 |
# st.write(f"🗣️ {get_translation('enregistrez_message')}")
|
| 706 |
+
elif audio:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 707 |
# Traitement de l'entrée audio de l'utilisateur
|
| 708 |
if len(audio) > 0:
|
| 709 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio:
|
|
|
|
| 799 |
#if 'operation_prompt' in locals():
|
| 800 |
# del operation_prompt
|
| 801 |
|
| 802 |
+
#if 'user_input' in locals():
|
| 803 |
+
# del user_input
|
| 804 |
if 'transcription' in locals():
|
| 805 |
del transcription
|
| 806 |
if 'operation_prompt' in locals():
|