Phaneendrabayi commited on
Commit
4e32ad2
·
verified ·
1 Parent(s): c0dfe34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -7,6 +7,9 @@ import pickle
7
  import chromadb
8
  from pydub import AudioSegment
9
 
 
 
 
10
  # Initialize ChromaDB
11
  chroma_client = chromadb.PersistentClient(path="./chroma_db")
12
  collection = chroma_client.get_or_create_collection(name="subtitles")
@@ -28,15 +31,11 @@ def load_pickle_data():
28
  )
29
  return data
30
  except FileNotFoundError:
 
31
  return []
32
 
33
  pickle_data = load_pickle_data()
34
 
35
- # App Title and Config
36
- st.set_page_config(page_title="Subtitle Generator")
37
- st.title("🎬 AI-Powered Subtitle Generator & Search")
38
- st.markdown("Upload an audio file to generate subtitles using AI, or search for specific words within the subtitles.")
39
-
40
  # Load Whisper Model
41
  @st.cache_resource()
42
  def load_model():
 
7
  import chromadb
8
  from pydub import AudioSegment
9
 
10
+ # Set Page Config (First Command)
11
+ st.set_page_config(page_title="Subtitle Generator")
12
+
13
  # Initialize ChromaDB
14
  chroma_client = chromadb.PersistentClient(path="./chroma_db")
15
  collection = chroma_client.get_or_create_collection(name="subtitles")
 
31
  )
32
  return data
33
  except FileNotFoundError:
34
+ st.error("Pickle file not found. Please check the file path.")
35
  return []
36
 
37
  pickle_data = load_pickle_data()
38
 
 
 
 
 
 
39
  # Load Whisper Model
40
  @st.cache_resource()
41
  def load_model():