Sakil commited on
Commit
6692f3a
·
verified ·
1 Parent(s): 5cf934c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -8,7 +8,7 @@ GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
8
  genai.configure(api_key=GOOGLE_API_KEY)
9
 
10
  def summarize_audio(audio_file_path, prompt):
11
- """Summarize the audio using Google's Generative API."""
12
  model = genai.GenerativeModel("models/gemini-1.5-pro-latest")
13
  audio_file = genai.upload_file(path=audio_file_path)
14
  response = model.generate_content(
@@ -30,12 +30,12 @@ def save_uploaded_file(uploaded_file):
30
  return None
31
 
32
  # Streamlit app interface
33
- st.title('Your AI Audio Summarization App')
34
 
35
- with st.expander("About Summarization app"):
36
  st.write("""
37
- This application utilizes Google's generative AI to summarise the content of audio files.
38
- Simply upload your WAV or MP3 file and provide a prompt to receive a brief summary of its contents.
39
  """)
40
 
41
  audio_file = st.file_uploader("Upload Audio File", type=['wav', 'mp3'])
@@ -45,8 +45,8 @@ if audio_file is not None:
45
 
46
  prompt = st.text_input("Enter your prompt:", "Please summarize the following audio.")
47
 
48
- if st.button('Summarize Audio'):
49
- with st.spinner('Please Wait : Summarizing...'):
50
  summary_text = summarize_audio(audio_path, prompt)
51
  st.info(summary_text)
52
 
 
8
  genai.configure(api_key=GOOGLE_API_KEY)
9
 
10
  def summarize_audio(audio_file_path, prompt):
11
+ """Summarize and extract the audio using Google's Generative API."""
12
  model = genai.GenerativeModel("models/gemini-1.5-pro-latest")
13
  audio_file = genai.upload_file(path=audio_file_path)
14
  response = model.generate_content(
 
30
  return None
31
 
32
  # Streamlit app interface
33
+ st.title('SoundScape Intelligence: Unveiling Insights from Audio')
34
 
35
+ with st.expander("About SoundScape Intelligence app"):
36
  st.write("""
37
+ This application utilizes Google's generative AI to summarize and extract key points from audio files .
38
+ Simply upload your WAV or MP3 file and provide a prompt to receive insight from the files.
39
  """)
40
 
41
  audio_file = st.file_uploader("Upload Audio File", type=['wav', 'mp3'])
 
45
 
46
  prompt = st.text_input("Enter your prompt:", "Please summarize the following audio.")
47
 
48
+ if st.button('Extract Insight from Audio'):
49
+ with st.spinner('Please Wait : Extracting Information...'):
50
  summary_text = summarize_audio(audio_path, prompt)
51
  st.info(summary_text)
52