Salif SAWADOGO commited on
Commit
68cc99d
·
1 Parent(s): 0a1f669

🔥 resolve end of page musmath

Browse files
app/index.py CHANGED
@@ -8,7 +8,8 @@ from pages.Home import page as home_page
8
  from asgiref.wsgi import WsgiToAsgi
9
  from functools import lru_cache
10
 
11
-
 
12
  class DashAppUI:
13
  STYLES = {
14
  "content": {"margin-left": "2rem", "margin-right": "2rem", "padding": "2rem 1rem"},
 
8
  from asgiref.wsgi import WsgiToAsgi
9
  from functools import lru_cache
10
 
11
+ from dotenv import load_dotenv
12
+ load_dotenv()
13
  class DashAppUI:
14
  STYLES = {
15
  "content": {"margin-left": "2rem", "margin-right": "2rem", "padding": "2rem 1rem"},
app/pages/Annotations/callbacks.py CHANGED
@@ -176,13 +176,16 @@ def update_transcription(n_clicks, selected_transcriptions, user_info, page_valu
176
  for val in selected_transcriptions:
177
  if val in values_store:
178
  values_store.remove(val)
179
- next_options = [{"label": t, "value": t} for t in (values_store[:6] + ["autre transcription"])] if values_store else []
180
  confirmation_message = (f"Transcriptions sélectionnées : {', '.join(selected_transcriptions)}"
181
  if selected_transcriptions else "Aucune transcription sélectionnée.")
182
  # Réinitialisation de la checklist
183
- if len(next_options)>1:
 
 
184
  return audio_store, values_store, next_audio, next_options, [], confirmation_message, stored_transcriptions
185
- return no_update, no_update, no_update, no_update, no_update, no_update, no_update
 
186
 
187
 
188
  # -----------------------------------------------------------------------------
 
176
  for val in selected_transcriptions:
177
  if val in values_store:
178
  values_store.remove(val)
179
+ next_options = [{"label": t, "value": t} for t in (values_store[:6] + ["autre transcription"])] if values_store else ["autre transcription"]
180
  confirmation_message = (f"Transcriptions sélectionnées : {', '.join(selected_transcriptions)}"
181
  if selected_transcriptions else "Aucune transcription sélectionnée.")
182
  # Réinitialisation de la checklist
183
+ print(next_options)
184
+ print("************")
185
+ if (len(next_options)>1):
186
  return audio_store, values_store, next_audio, next_options, [], confirmation_message, stored_transcriptions
187
+
188
+ return no_update, no_update, no_update, no_update, no_update, "fin de la page, veuillez sauvegarder", stored_transcriptions
189
 
190
 
191
  # -----------------------------------------------------------------------------
app/pages/Contributeurs/callbacks.py CHANGED
@@ -7,7 +7,10 @@ from helpers.s3 import S3Client
7
  from helpers.models import S3Config
8
  from global_vars import BUCKET_NAME
9
  from app import app
10
-
 
 
 
11
  # Initialisation des clients
12
  s3_config = S3Config(
13
  bucket_name=BUCKET_NAME,
 
7
  from helpers.models import S3Config
8
  from global_vars import BUCKET_NAME
9
  from app import app
10
+ from dotenv import load_dotenv
11
+ load_dotenv(".env")
12
+ print("*********************c")
13
+ print(os.getenv("AWS_ENDPOINT_URL_S3"))
14
  # Initialisation des clients
15
  s3_config = S3Config(
16
  bucket_name=BUCKET_NAME,