CB commited on
Commit
8d59029
·
verified ·
1 Parent(s): 26b59d7

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +4 -8
streamlit_app.py CHANGED
@@ -447,20 +447,16 @@ if generate_now and not st.session_state.get("busy"):
447
  local_path = current_path
448
  upload_path, compressed = compress_video_if_large(local_path, threshold_mb=st.session_state.get("compress_threshold_mb", 200))
449
 
450
- # Set rag_store_name here
451
  rag_store_name = "your_rag_store_name" # Set your ragStoreName here
452
 
453
  # Configure the context for using RAG
454
  try:
455
  genai.configure_rag_context({'ragStoreName': rag_store_name}) # Hypothetical function
456
-
457
- with st.spinner(f"Uploading video{' (compressed)' if compressed else ''}..."):
458
- try:
459
  uploaded = upload_video_sdk(upload_path)
460
- except Exception as e:
461
- st.session_state["last_error"] = f"Upload failed for {upload_path}: {e}\n{traceback.format_exc()}"
462
- st.error(f"Upload failed: {e}. Check the error log for more details.")
463
- raise
464
 
465
  try:
466
  processing_placeholder = st.empty()
 
447
  local_path = current_path
448
  upload_path, compressed = compress_video_if_large(local_path, threshold_mb=st.session_state.get("compress_threshold_mb", 200))
449
 
 
450
  rag_store_name = "your_rag_store_name" # Set your ragStoreName here
451
 
452
  # Configure the context for using RAG
453
  try:
454
  genai.configure_rag_context({'ragStoreName': rag_store_name}) # Hypothetical function
455
+ with st.spinner(f"Uploading video{' (compressed)' if compressed else ''}..."):
 
 
456
  uploaded = upload_video_sdk(upload_path)
457
+ except Exception as e:
458
+ st.session_state["last_error"] = f"Upload failed: {e}"
459
+ st.error("Upload failed. See Last Error for details.")
 
460
 
461
  try:
462
  processing_placeholder = st.empty()