awacke1 commited on
Commit
e04becd
·
verified ·
1 Parent(s): ac52042

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,7 +19,6 @@ import shutil
19
  import streamlit as st
20
  import streamlit.components.v1 as components
21
  import sys
22
- import textract
23
  import time
24
  import torch
25
  import zipfile
@@ -226,7 +225,7 @@ def download_pdf(url, output_path):
226
  async def process_pdf_snapshot(pdf_path, mode="single"):
227
  start_time = time.time()
228
  status = st.empty()
229
- status.text(f"Processing PDF SnapshotK Snapshot ({mode})... (0s)")
230
  try:
231
  doc = fitz.open(pdf_path)
232
  output_files = []
@@ -373,6 +372,7 @@ def process_video(video_path, user_prompt):
373
  def process_video_frames(video_path, seconds_per_frame=2):
374
  base64Frames = []
375
  base_video_path, _ = os.path.splitext(video_path)
 
376
  video = cv2.VideoCapture(video_path)
377
  total_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
378
  fps = video.get(cv2.CAP_PROP_FPS)
@@ -582,7 +582,7 @@ def FileSidebar():
582
 
583
  FileSidebar()
584
 
585
- tabs = st.tabs(["Camera 📷", "Download RFP 📥", "OCR 🔍", "Build 🌱", "Image Gen 🎨", "PDF 📄", "Image 🖼️", "Audio 🎵", "Video 🎥", "Code 🧑‍💻", "Gallery 📚", "Search 🔎"])
586
  (tab_camera, tab_download, tab_ocr, tab_build, tab_imggen, tab_pdf, tab_image, tab_audio, tab_video, tab_code, tab_gallery, tab_search) = tabs
587
 
588
  with tab_camera:
 
19
  import streamlit as st
20
  import streamlit.components.v1 as components
21
  import sys
 
22
  import time
23
  import torch
24
  import zipfile
 
225
  async def process_pdf_snapshot(pdf_path, mode="single"):
226
  start_time = time.time()
227
  status = st.empty()
228
+ status.text(f"Processing PDF Snapshot ({mode})... (0s)")
229
  try:
230
  doc = fitz.open(pdf_path)
231
  output_files = []
 
372
  def process_video_frames(video_path, seconds_per_frame=2):
373
  base64Frames = []
374
  base_video_path, _ = os.path.splitext(video_path)
375
+ base_video_path = video_path
376
  video = cv2.VideoCapture(video_path)
377
  total_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT))
378
  fps = video.get(cv2.CAP_PROP_FPS)
 
582
 
583
  FileSidebar()
584
 
585
+ tabs = st.tabs(["Camera 📷", "Download 📥", "OCR 🔍", "Build 🌱", "Image Gen 🎨", "PDF 📄", "Image 🖼️", "Audio 🎵", "Video 🎥", "Code 🧑‍💻", "Gallery 📚", "Search 🔎"])
586
  (tab_camera, tab_download, tab_ocr, tab_build, tab_imggen, tab_pdf, tab_image, tab_audio, tab_video, tab_code, tab_gallery, tab_search) = tabs
587
 
588
  with tab_camera: