jarondon82 commited on
Commit
a9e5470
·
1 Parent(s): 19be28f

Corregir error unexpected '{' in field name

Browse files
Files changed (1) hide show
  1. streamlit_app.py +3 -2
streamlit_app.py CHANGED
@@ -2529,7 +2529,8 @@ def main():
2529
  with camera_container:
2530
  st.info("Auto-capture enabled. Camera should start automatically.")
2531
 
2532
- # Construir el HTML del componente de cámara
 
2533
  camera_component_html = """
2534
  <div style="margin-bottom: 20px;">
2535
  <video id="webcam" autoplay playsinline width="640" height="480" style="border-radius: 5px; display: none;"></video>
@@ -2562,7 +2563,7 @@ def main():
2562
  let lastBoxes = [];
2563
 
2564
  // Configuración dinámica del FPS (desde Streamlit)
2565
- const captureDelay = 1000 / {0};
2566
 
2567
  // Iniciar la cámara
2568
  async function setupCamera() {
 
2529
  with camera_container:
2530
  st.info("Auto-capture enabled. Camera should start automatically.")
2531
 
2532
+ # Construir el HTML del componente de cámara con valor de FPS inyectado directamente
2533
+ fps_value = st.session_state.get('capture_fps', 1.0)
2534
  camera_component_html = """
2535
  <div style="margin-bottom: 20px;">
2536
  <video id="webcam" autoplay playsinline width="640" height="480" style="border-radius: 5px; display: none;"></video>
 
2563
  let lastBoxes = [];
2564
 
2565
  // Configuración dinámica del FPS (desde Streamlit)
2566
+ const captureDelay = 1000 / """ + str(fps_value) + """;
2567
 
2568
  // Iniciar la cámara
2569
  async function setupCamera() {